/* ==========================================================================
   Registration form skin (Fluent Forms, form #3) — loaded only on pages that
   embed a form.
   ⚠ Fluent Forms' own selectors run two and three classes deep, e.g.
   `.ff-default .ff-el-form-control` (0,2,0) and
   `.ff-default .ff-el-form-check label.ff-el-form-check-label` (0,3,1).
   Everything here is anchored on `.gs-card .fluentform` so it is always deeper.
   Measure with the browser before assuming a rule is winning (SL trap 2/29/36).
   ========================================================================== */

.gs-card .fluentform {
	margin-top: 1.75rem;
	/* The card is narrow on a phone AND beside the photo at ~1024px, so the form
	   adapts to its own width, not the screen's (see the @container rule below). */
	container-type: inline-size;
	container-name: gsform;
	/* Fluent Forms sizes selects from this variable (default: auto → a squashed select). */
	--fluentform-input-select-height: 56px;
}
.gs-card .fluentform .frm-fluent-form { margin: 0; }

/* Spacing: label → input 8px, field → field 22px (≈1:3, label belongs to its own field) */
.gs-card .fluentform .ff-el-group { margin-bottom: 22px; }
.gs-card .fluentform .ff-el-input--label { margin-bottom: 8px; padding: 0; }

.gs-card .fluentform .ff-el-input--label label {
	color: var(--gs-slate);
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1.3;
	margin: 0;
}
/* The reference draws the required star in the label's own colour, not red. */
.gs-card .fluentform .ff-el-input--label.ff-el-is-required.asterisk-right label::after {
	color: inherit;
	margin-left: 3px;
}

/* Two-field rows. Fluent Forms owns this container's display: its conditional
   logic writes display:flex / display:none inline when the Athlete fields show or
   hide, so the rows stay flex and only the cells are sized here. The plugin also
   writes flex-basis:50% inline on each cell; !important is the only way past an
   inline style, and it touches nothing but the basis. */
.gs-card .fluentform .ff-t-container.gs-row {
	flex-wrap: wrap;
	gap: 0 16px;
	margin: 0;
	padding: 0;
	width: 100%;
}
.gs-card .fluentform .ff-t-container.gs-row > .ff-t-cell {
	flex: 1 1 0 !important;
	flex-basis: calc(50% - 8px) !important;
	padding: 0;
	margin: 0;
	width: auto;
	min-width: 0;
}

/* Inputs ----------------------------------------------------------------- */
.gs-card .fluentform .ff-el-form-control {
	box-sizing: border-box;
	width: 100%;
	height: 56px;
	padding: 0 16px;
	background-color: #fff;
	border: 1px solid var(--gs-line);
	border-radius: 2px;
	box-shadow: none;
	color: var(--gs-ink);
	font-family: inherit;
	font-size: 1rem; /* 16px: iOS zooms the page on anything smaller */
	line-height: 1.4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gs-card .fluentform .ff-el-form-control::placeholder { color: #687176; opacity: 1; } /* 4.99:1 on white (was #8a9399, 3.13:1) */
.gs-card .fluentform .ff-el-form-control:hover { border-color: #aeb8bf; }
.gs-card .fluentform .ff-el-form-control:focus {
	border-color: var(--gs-deep);
	box-shadow: 0 0 0 3px rgba(12, 56, 85, 0.16);
	outline: none;
}

.gs-card .fluentform select.ff-el-form-control {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%230c3855' stroke-width='2'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 14px 9px;
	cursor: pointer;
}
/* The empty option doubles as the placeholder: grey until a choice is made. */
.gs-card .fluentform select.ff-el-form-control:has(option[value=""]:checked) { color: #687176; }

/* Phone field: intl-tel-input writes its own left padding inline for the flag. */
.gs-card .fluentform .iti { width: 100%; display: block; }
.gs-card .fluentform .iti__selected-country { border-radius: 2px 0 0 2px; }

/* The two tabs (the registration_type radio) ------------------------------ */
.gs-card .fluentform .ff-el-group.gs-tabs { margin-bottom: 26px; }
.gs-card .fluentform .gs-tabs > .ff-el-input--label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.gs-card .fluentform .gs-tabs .ff-el-input--content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	padding: 5px;
	background: #e5edf0;
	border-radius: 2px;
}
.gs-card .fluentform .gs-tabs .ff-el-form-check {
	position: relative;
	display: block;
	margin: 0;
	padding: 0;
}
.gs-card .fluentform .gs-tabs .ff-el-form-check label.ff-el-form-check-label {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	margin: 0;
	padding: 0.5rem 0.75rem;
	border-radius: 2px;
	color: #3b5566;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.gs-card .fluentform .gs-tabs .ff-el-form-check label.ff-el-form-check-label:hover { color: var(--gs-ink); }
.gs-card .fluentform .gs-tabs .ff-el-form-check label.ff-el-form-check-label > span { padding: 0; }
.gs-card .fluentform .gs-tabs .ff-el-form-check label.ff-el-form-check-label > span::before,
.gs-card .fluentform .gs-tabs .ff-el-form-check label.ff-el-form-check-label > span::after { content: none; }
/* The real radio stays in the page (keyboard + screen readers), just invisible. */
.gs-card .fluentform .gs-tabs .ff-el-form-check input.ff-el-form-check-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
.gs-card .fluentform .gs-tabs .ff-el-form-check.ff_item_selected label.ff-el-form-check-label,
.gs-card .fluentform .gs-tabs .ff-el-form-check:has(input:checked) label.ff-el-form-check-label {
	background: var(--gs-deep-2);
	color: #fff;
	box-shadow: 0 1px 2px rgba(7, 27, 51, 0.25);
}
.gs-card .fluentform .gs-tabs .ff-el-form-check:has(input:focus-visible) label.ff-el-form-check-label {
	outline: 3px solid var(--gs-deep); /* gold was 1.65–1.87:1 on the light card; navy is 10:1+ */
	outline-offset: 2px;
}

/* Narrow form (phones, and the card beside the photo): after the tab rules on purpose —
   same selectors, so order decides (Codex, 2026-09-24). */
@container gsform (max-width: 419px) {
	.gs-card .fluentform .ff-t-container.gs-row > .ff-t-cell { flex-basis: 100% !important; }
	/* Tab labels on one line inside a half-width tab on a phone */
	.gs-card .fluentform .gs-tabs .ff-el-form-check label.ff-el-form-check-label { font-size: 0.8125rem; letter-spacing: 0.01em; padding-inline: 0.4rem; }
}

/* Note under the team fields ---------------------------------------------- */
.gs-card .fluentform .ff-el-group.gs-note-wrap { margin: -4px 0 20px; }
.gs-card .fluentform .gs-form-note {
	margin: 0;
	color: var(--gs-muted);
	font-size: 0.95rem;
	line-height: 1.5;
}

/* Photo upload (Athlete tab) -----------------------------------------------
   Fluent Forms draws a grey 45px button; here the whole holder becomes a
   field-sized dashed drop target with a camera mark, in the card's colours.
   The real <input type=file> stays (screen-reader-only) — the label opens it. */
.gs-card .fluentform .gs-photo .ff_file_upload_holder {
	display: block;
	margin: 0;
	cursor: pointer;
}
.gs-card .fluentform .gs-photo .ff_upload_btn.ff-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-sizing: border-box;
	width: 100%;
	min-height: 56px;
	margin: 0;
	padding: 0 16px;
	background: #f3f7f9;
	border: 1px dashed #9fb3c0;
	border-radius: 2px;
	box-shadow: none;
	color: var(--gs-deep);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}
.gs-card .fluentform .gs-photo .ff_upload_btn.ff-btn::before {
	content: "";
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%230c3855' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M3 8h4l2-3h6l2 3h4v11H3z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E") no-repeat center / contain;
}
.gs-card .fluentform .gs-photo .ff_upload_btn.ff-btn:hover {
	background-color: #eaf1f5;
	border-color: var(--gs-deep);
}
.gs-card .fluentform .gs-photo .ff_upload_btn.ff-btn:focus-visible {
	outline: 3px solid var(--gs-deep); /* gold was 1.65–1.87:1 on the light card; navy is 10:1+ */
	outline-offset: 2px;
}
.gs-card .fluentform .gs-photo.ff-el-is-error .ff_upload_btn.ff-btn { border-color: #c0392b; }
.gs-card .fluentform .gs-photo .ff-el-help-message {
	margin-top: 8px;
	color: var(--gs-muted);
	font-size: 0.875rem;
	font-style: normal;
	line-height: 1.45;
}
/* The chosen photo: Fluent Forms writes a 12px list with inline styles. */
.gs-card .fluentform .gs-photo .ff-uploaded-list { font-size: 0.9rem !important; margin-top: 10px !important; }
.gs-card .fluentform .gs-photo .ff-uploaded-list:empty { display: none; }
.gs-card .fluentform .gs-photo .ff-el-progress-bar { background-color: var(--gs-deep); }

/* Submit -------------------------------------------------------------------- */
.gs-card .fluentform .ff-el-group.gs-submit { margin: 4px 0 0; }
.gs-card .fluentform .ff-el-group.gs-submit .ff-btn.ff-btn-submit {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	min-height: 58px;
	margin: 0;
	padding: 0 1.4rem;
	background-color: var(--gs-deep);
	border: 0;
	border-radius: 2px;
	color: #fff;
	font-family: inherit;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	line-height: 1.2;
	text-align: left;
	text-transform: uppercase;
	cursor: pointer;
	opacity: 1;
	transition: background-color 0.15s ease;
}
.gs-card .fluentform .ff-el-group.gs-submit .ff-btn.ff-btn-submit::after {
	content: "";
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M3 15L15 3M6 3h9v9' fill='none' stroke='%23ffffff' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat center / contain;
}
.gs-card .fluentform .ff-el-group.gs-submit .ff-btn.ff-btn-submit:hover { background-color: var(--gs-navy); }
.gs-card .fluentform .ff-el-group.gs-submit .ff-btn.ff-btn-submit:focus-visible {
	outline: 3px solid var(--gs-deep); /* gold was 1.65–1.87:1 on the light card; navy is 10:1+ */
	outline-offset: 3px;
}
.gs-card .fluentform .ff-el-group.gs-submit .ff-btn.ff-btn-submit:disabled { opacity: 0.7; cursor: progress; }

/* Errors -------------------------------------------------------------------- */
.gs-card .fluentform .ff-el-is-error .ff-el-form-control { border-color: #c0392b; }
.gs-card .fluentform .ff-el-is-error .text-danger,
.gs-card .fluentform .error.text-danger {
	margin-top: 6px;
	color: #b3261e;
	font-size: 0.875rem;
	line-height: 1.4;
}
.gs-card .ff-errors-in-stack { color: #b3261e; }
.gs-card .ff-message-success {
	border: 0;
	background: #e9f3f7;
	color: var(--gs-ink);
	box-shadow: none;
}
