/* ── FF Fencing Survey — Front-end Styles ─────────────────────────────── */

.ff-survey-wrap {
	max-width: 700px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1a1a2e;
}

/* Progress bar */
.ff-survey-progress {
	height: 6px;
	background: #e8eaf0;
	border-radius: 4px;
	margin-bottom: 6px;
	overflow: hidden;
}
.ff-survey-progress-bar {
	height: 100%;
	width: 25%;
	background: #1a3a6b;
	border-radius: 4px;
	transition: width 0.4s ease;
}
.ff-survey-step-label {
	text-align: right;
	font-size: 0.8rem;
	color: #6b7280;
	margin: 0 0 24px;
}

/* Section title */
.ff-survey-section-title {
	font-size: 1.7rem;
	font-weight: 700;
	color: #1a3a6b;
	border-bottom: 2px solid #e8eaf0;
	padding-bottom: 12px;
	margin: 0 0 24px;
	width: 100%;
	text-align: center;
}

.ff-section-desc {
	font-size: 0.9rem;
	color: #4b5563;
	margin: -12px 0 20px;
	line-height: 1.5;
}
.ff-section-desc-note {
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 8px;
	padding: 10px 14px;
	color: #78350f;
	margin-top: 0;
}

/* Fields */
.ff-field {
	margin-bottom: 20px;
}
.ff-field label {
	display: block;
	font-weight: 600;
	font-size: 0.92rem;
	margin-bottom: 6px;
	color: #374151;
}
.ff-req {
	color: #c0392b;
	margin-left: 2px;
}

.ff-field select,
.ff-field input[type="number"],
.ff-field textarea {
	width: 100%;
	padding: 10px 14px;
	border: 2px solid #d1d5db;
	border-radius: 8px;
	font-size: 0.95rem;
	background: #fff;
	color: #111827;
	transition: border-color 0.2s;
	box-sizing: border-box;
}
.ff-field select:focus,
.ff-field input[type="number"]:focus,
.ff-field textarea:focus {
	outline: none;
	border-color: #1a3a6b;
	box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.1);
}
.ff-field select.ff-error,
.ff-field input.ff-error,
.ff-field textarea.ff-error {
	border-color: #c0392b;
	box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}
.ff-input-dollar:has(input.ff-error),
.ff-input-count:has(input.ff-error) {
	border-color: #c0392b;
	box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}
.ff-field textarea {
	resize: vertical;
	min-height: 90px;
}

/* Dollar input */
.ff-input-dollar {
	display: flex;
	align-items: center;
	border: 2px solid #d1d5db;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	transition: border-color 0.2s;
}
.ff-input-dollar:focus-within {
	border-color: #1a3a6b;
	box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.1);
}
.ff-input-dollar span {
	padding: 10px 12px;
	background: #f3f4f6;
	font-weight: 700;
	color: #374151;
	font-size: 0.95rem;
	border-right: 2px solid #d1d5db;
}
.ff-input-dollar input[type="number"] {
	border: none;
	border-radius: 0;
	flex: 1;
	box-shadow: none;
}
.ff-input-dollar input[type="number"]:focus {
	outline: none;
	box-shadow: none;
}

/* Cost grid */
.ff-cost-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 24px;
}
@media (max-width: 540px) {
	.ff-cost-grid { grid-template-columns: 1fr; }
}

/* USA Fencing membership table layout */
.ff-usaf-grid {
	display: grid;
	grid-template-columns: 160px 1fr 1fr;
	gap: 8px 16px;
	align-items: start;
}
/* Grid cells that hold inputs must stack vertically so error messages
   render below the input wrapper rather than beside it. */
.ff-usaf-grid > div:not(.ff-usaf-header):not(.ff-usaf-rowlabel) {
	display: flex;
	flex-direction: column;
}
@media (max-width: 480px) {
	.ff-usaf-grid {
		grid-template-columns: 110px 1fr 1fr;
		gap: 6px 10px;
	}
}

.ff-usaf-header {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #6b7280;
	padding-bottom: 4px;
	border-bottom: 1px solid #e5e7eb;
}

.ff-usaf-rowlabel {
	font-size: 0.9rem;
	font-weight: 600;
	color: #374151;
}

/* Count input — mirrors ff-input-dollar styling */
.ff-input-count {
	display: flex;
	align-items: center;
	border: 2px solid #d1d5db;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	transition: border-color 0.2s;
}
.ff-input-count:focus-within {
	border-color: #1a3a6b;
	box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.1);
}
.ff-input-count span {
	padding: 10px 12px;
	background: #f3f4f6;
	font-weight: 700;
	color: #374151;
	font-size: 0.95rem;
	border-right: 2px solid #d1d5db;
}
.ff-input-count input[type="number"] {
	border: none;
	border-radius: 0;
	flex: 1;
	box-shadow: none;
	padding: 10px 14px;
	font-size: 0.95rem;
	background: #fff;
	color: #111827;
}
.ff-input-count input[type="number"]:focus {
	outline: none;
	box-shadow: none;
}
.ff-usaf-fixed-count {
	background: #f9fafb;
	cursor: default;
}
.ff-usaf-count-static {
	flex: 1;
	padding: 10px 14px;
	font-size: 0.95rem;
	color: #6b7280;
	font-style: italic;
}

/* Travel cost sub-group */
.ff-cost-subgroup {
	margin-top: 20px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 16px 16px 4px;
	background: #f8faff;
}
.ff-cost-subgroup-label {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #1a3a6b;
	margin: 0 0 14px;
}

.ff-total-row {
	text-align: right;
	font-size: 1rem;
	color: #374151;
	margin: 4px 0 20px;
	padding: 12px 16px;
	background: #f0f4ff;
	border-radius: 8px;
}
.ff-total-row strong {
	font-size: 1.2rem;
	color: #1a3a6b;
}

/* Checkboxes & radios */
.ff-checkbox-group,
.ff-radio-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 4px;
}
.ff-checkbox-label,
.ff-radio-label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.92rem;
	font-weight: 400 !important;
	cursor: pointer;
	color: #374151;
}
.ff-checkbox-label input[type="checkbox"],
.ff-radio-label input[type="radio"] {
	width: 18px;
	height: 18px;
	accent-color: #1a3a6b;
	flex-shrink: 0;
	cursor: pointer;
}

/* Navigation buttons */
.ff-nav-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid #e8eaf0;
}
.ff-nav-row:has(.ff-btn-next:only-child),
.ff-nav-row:has(.ff-btn-submit:only-child) {
	justify-content: flex-end;
}
.ff-btn {
	padding: 11px 28px;
	border-radius: 8px;
	border: none;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
}
.ff-btn:active {
	transform: scale(0.97);
}
.ff-btn-next,
.ff-btn-submit {
	background: #1a3a6b;
	color: #fff;
}
.ff-btn-next:hover,
.ff-btn-submit:hover {
	background: #15305a;
}
.ff-btn-back {
	background: #f3f4f6;
	color: #374151;
}
.ff-btn-back:hover {
	background: #e5e7eb;
}
.ff-btn-submit {
	background: #c0392b;
	min-width: 160px;
}
.ff-btn-submit:hover {
	background: #a93226;
}
.ff-btn-submit:disabled {
	background: #9ca3af;
	cursor: not-allowed;
}

/* Step transition */
.ff-survey-step {
	border: none;
	padding: 0;
	margin: 0;
	animation: ff-fade-in 0.3s ease;
}
@keyframes ff-fade-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Thank-you */
.ff-survey-thankyou {
	text-align: center;
	padding: 48px 32px;
	background: #f0fdf4;
	border: 2px solid #6ee7b7;
	border-radius: 16px;
	animation: ff-fade-in 0.4s ease;
}
.ff-thankyou-icon {
	font-size: 3rem;
	color: #059669;
	background: #d1fae5;
	width: 72px;
	height: 72px;
	line-height: 72px;
	border-radius: 50%;
	margin: 0 auto 20px;
}
.ff-survey-thankyou h2 {
	font-size: 1.6rem;
	color: #065f46;
	margin: 0 0 12px;
}
.ff-survey-thankyou p {
	color: #374151;
	font-size: 1rem;
	max-width: 480px;
	margin: 0 auto;
	line-height: 1.6;
}
.ff-thankyou-another-label {
	margin-top: 2rem !important;
	font-weight: 600;
	color: #065f46;
}
.ff-btn-restart {
	margin-top: 0.75rem;
	background: #1a3a6b;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 12px 28px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}
.ff-btn-restart:hover {
	background: #122c54;
}

/* Error */
.ff-survey-error {
	background: #fef2f2;
	border: 2px solid #fca5a5;
	color: #7f1d1d;
	border-radius: 8px;
	padding: 14px 18px;
	margin-top: 16px;
	font-size: 0.92rem;
}

/* Field-level error hint */
.ff-field-error {
	color: #c0392b;
	font-size: 0.84rem;
	font-weight: 600;
	margin-top: 6px;
	display: flex;
	align-items: center;
	gap: 5px;
}
.ff-field-error::before {
	content: '!';
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	background: #c0392b;
	color: #fff;
	border-radius: 50%;
	font-size: 0.7rem;
	font-weight: 700;
	flex-shrink: 0;
}

/* Checkbox/radio group invalid state — highlights the whole group */
.ff-group-invalid {
	border-left: 3px solid #c0392b;
	padding-left: 14px;
	margin-left: -17px;
	border-radius: 0 8px 8px 0;
	background: rgba(192, 57, 43, 0.04);
	padding-top: 8px;
	padding-bottom: 8px;
}

/* Field hint (grey helper text below a field) */
.ff-field-hint {
	font-size: 0.78rem;
	color: #6b7280;
	margin: 4px 0 0;
	line-height: 1.4;
}

/* Checkbox subgroup heading */
.ff-checkbox-subhead {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #9ca3af;
	margin: 12px 0 4px;
}
.ff-checkbox-subhead:first-child {
	margin-top: 0;
}

/* Divider line between competitive and non-competitive options */
.ff-checkbox-divider {
	border: none;
	border-top: 1px solid #e5e7eb;
	margin: 10px 0;
}

/* Grouped checkbox container */
.ff-age-group-checks {
	background: #fafafa;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 14px 16px;
	margin-top: 8px;
}

/* 3-column grid inside the age group box */
.ff-age-group-cols {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0 20px;
}
@media (max-width: 480px) {
	.ff-age-group-cols {
		grid-template-columns: 1fr;
	}
}

.ff-age-group-col {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* 2-column layout for program type */
.ff-two-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 20px;
}
@media (max-width: 480px) {
	.ff-two-cols { grid-template-columns: 1fr; }
}

/* "Other" barrier textarea reveal */
.ff-other-expand {
	margin-top: 10px;
	animation: ff-fade-in 0.2s ease;
}
.ff-other-expand textarea {
	width: 100%;
	padding: 10px 14px;
	border: 2px solid #1a3a6b;
	border-radius: 8px;
	font-size: 0.92rem;
	background: #f8faff;
	color: #111827;
	resize: vertical;
	min-height: 80px;
	box-sizing: border-box;
}
.ff-other-expand textarea:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.1);
}

/* Gate screen ────────────────────────────────────────────────────────── */
.ff-gate-quick-title {
	font-weight: 600;
	font-size: 0.92rem;
	color: #374151;
	margin: 24px 0 6px;
}
.ff-gate-quick-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin: 0px 0 28px;
	padding: 18px 20px;
	background: #f8faff;
	border: 1px solid #dbeafe;
	border-radius: 10px;
}
@media (max-width: 640px) {
	.ff-gate-quick-fields { grid-template-columns: 1fr; }
}
.ff-gate-quick-fields .ff-field {
	margin-bottom: 0;
	display: flex;
	flex-direction: column;
}
.ff-gate-quick-fields .ff-field select {
	margin-top: auto;
}
.ff-gate-question {
	font-size: 1.15rem;
	font-weight: 600;
	color: #1a3a6b;
	text-align: center;
	margin: 8px 0 24px;
}
.ff-gate-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 12px;
}
.ff-gate-cards-3 {
	grid-template-columns: 1fr 1fr 1fr;
}
.ff-gate-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 28px 20px;
	background: #fff;
	border: 2px solid #1a3a6b;
	border-radius: 14px;
	cursor: pointer;
	transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
	font-family: inherit;
	color: #1a3a6b;
	gap: 10px;
}
.ff-gate-card:hover {
	background: #1a3a6b;
	color: #fff;
	box-shadow: 0 6px 20px rgba(26,58,107,0.18);
	transform: translateY(-2px);
}
.ff-gate-card-alt {
	border-color: #374151;
	color: #374151;
}
.ff-gate-card-alt:hover {
	background: #374151;
	color: #fff;
	box-shadow: 0 6px 20px rgba(55,65,81,0.18);
}
.ff-gate-card-icon {
	font-size: 2.2rem;
	line-height: 1;
}
.ff-gate-card-title {
	font-size: 1.1rem;
	font-weight: 700;
}
.ff-gate-card-desc {
	font-size: 0.87rem;
	opacity: 0.8;
	line-height: 1.45;
}
.ff-gate-card-former {
	border-color: #92400e;
	color: #78350f;
}
.ff-gate-card-former:hover {
	background: #78350f;
	color: #fff;
	box-shadow: 0 6px 20px rgba(120,53,15,0.18);
}
@media (max-width: 640px) {
	.ff-gate-cards-3 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
	.ff-gate-cards { grid-template-columns: 1fr; }
}

/* NF-only conditional field inside step 3 */
.ff-nf-only-field {
	border-top: 1px solid #e5e7eb;
	margin-top: 16px;
	padding-top: 16px;
}

/* ── Likert scale ──────────────────────────────────────────────────────── */
.ff-likert-wrap {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
	margin-top: 10px;
}
.ff-likert-head,
.ff-likert-row {
	display: grid;
	grid-template-columns: minmax(140px, 2fr) repeat(5, 1fr);
	align-items: center;
}
.ff-likert-head {
	background: #f0f4f8;
	border-bottom: 1px solid #e5e7eb;
}
.ff-likert-q-head {
	padding: 10px 12px;
	font-size: 0.78rem;
	font-weight: 600;
	color: #6b7280;
}
.ff-likert-head > span {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 10px 4px;
	font-size: 0.72rem;
	font-weight: 600;
	color: #6b7280;
	line-height: 1.3;
}
.ff-likert-head > span small {
	font-weight: 400;
	font-size: 0.67rem;
}
.ff-likert-row {
	border-top: 1px solid #f0f0f0;
}
.ff-likert-row:first-of-type {
	border-top: none;
}
.ff-likert-row-label {
	padding: 12px;
	font-size: 0.88rem;
	color: #374151;
	font-weight: 500;
}
.ff-likert-row > label {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	padding: 10px 4px;
	cursor: pointer;
	font-size: 0.72rem;
	color: #9ca3af;
	transition: background 0.15s;
}
.ff-likert-row > label:hover {
	background: #f0f4ff;
}
.ff-likert-row > label input[type="radio"] {
	cursor: pointer;
	margin: 0;
}
.ff-likert-row > label input[type="radio"]:checked + span {
	color: #1a3a6b;
	font-weight: 700;
}
@media (max-width: 520px) {
	.ff-likert-head,
	.ff-likert-row {
		grid-template-columns: minmax(90px, 1.5fr) repeat(5, minmax(30px, 1fr));
	}
	.ff-likert-row-label,
	.ff-likert-q-head { padding: 8px 6px; font-size: 0.78rem; }
	.ff-likert-head > span,
	.ff-likert-row > label { padding: 8px 2px; font-size: 0.65rem; }
}

/* Proxy checkbox row */
.ff-field-proxy {
	background: #f0f4ff;
	border: 1px solid #c7d2fe;
	border-radius: 8px;
	padding: 12px 16px;
}
.ff-proxy-label {
	font-weight: 500 !important;
	color: #1a3a6b !important;
}
