/*
 * BFHoF Nomination Form.
 *
 * Colors and fonts come from the site's Elementor global kit, with the
 * kit's current values as fallbacks: navy and orange, Roboto Condensed for
 * headings, the "Nav & Buttons" type (Roboto Condensed 900, uppercase) for
 * buttons, square corners throughout.
 */

.bfhof-nf {
	--nf-navy: var(--e-global-color-secondary, #092E63);
	--nf-orange: var(--e-global-color-primary, #CD4712);
	--nf-orange-dark: #A5360A;
	--nf-ink: #233B6B;
	--nf-muted: #5b6577;
	--nf-line: #c9d1dd;
	--nf-line-soft: #e3e7ee;
	--nf-tint: #f4f6f9;
	--nf-error: #b3261e;
	--nf-error-tint: #fdf1f0;
	--nf-heading: var(--e-global-typography-primary-font-family, "Roboto Condensed"), "Roboto Condensed", sans-serif;
	--nf-button: var(--e-global-typography-bfhofnav-font-family, "Roboto Condensed"), "Roboto Condensed", sans-serif;
	--nf-button-size: var(--e-global-typography-bfhofnav-font-size, 18px);
	--nf-button-weight: var(--e-global-typography-bfhofnav-font-weight, 900);
	--nf-focus: 0 0 0 3px color-mix(in srgb, var(--nf-orange) 40%, transparent);

	color: var(--nf-ink);
	font-size: 16px;
	line-height: 1.6;
}

.bfhof-nf *,
.bfhof-nf *::before,
.bfhof-nf *::after {
	box-sizing: border-box;
}

.bfhof-nf p {
	margin: 0 0 0.75em;
}

.bfhof-nf a {
	color: var(--nf-orange);
	text-underline-offset: 3px;
}

.bfhof-nf a:hover {
	color: var(--nf-navy);
}

.bfhof-nf__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.bfhof-nf__small {
	color: var(--nf-muted);
	font-size: 14px;
	line-height: 1.55;
}

/* ── Intro ───────────────────────────────────────────────────────── */

.bfhof-nf__intro {
	display: grid;
	/* The deadline box takes 30% of the row (about 410px at the site's
	 * 1400px container), and never less than 320px. */
	grid-template-columns: minmax(0, 1fr) minmax(0, max(320px, 30%));
	gap: clamp(24px, 4vw, 48px);
	margin-bottom: clamp(32px, 5vw, 56px);
}

.bfhof-nf__intro-title,
.bfhof-nf__done-title {
	margin: 0 0 14px;
	color: var(--nf-navy);
	font-family: var(--nf-heading);
	font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.75rem);
	font-weight: 900;
	line-height: 1.05;
	text-transform: uppercase;
}

.bfhof-nf__intro h3 {
	margin: 0 0 8px;
	color: var(--nf-navy);
	font-family: var(--nf-heading);
	font-size: 1.15rem;
	font-weight: 700;
	text-transform: uppercase;
}

.bfhof-nf__intro-cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
	margin-top: 24px;
}

.bfhof-nf__intro ul {
	margin: 0;
	padding-left: 1.15em;
}

.bfhof-nf__intro li {
	margin-bottom: 4px;
}

.bfhof-nf__intro li::marker {
	color: var(--nf-orange);
}

.bfhof-nf__intro-aside {
	align-self: start;
	padding: 26px 26px 22px;
	background: var(--nf-navy);
	color: #fff;
}

.bfhof-nf__intro-aside h3 {
	margin-top: 22px;
	color: #fff;
}

.bfhof-nf__intro-aside .bfhof-nf__small,
.bfhof-nf__intro-aside address {
	color: rgba(255, 255, 255, 0.82);
	font-style: normal;
}

.bfhof-nf__intro-aside a {
	color: #fff;
}

/* The form's link hover is navy, which vanishes on this navy box. */
.bfhof-nf .bfhof-nf__intro-aside a:hover,
.bfhof-nf .bfhof-nf__intro-aside a:focus-visible {
	color: var(--nf-orange);
}

.bfhof-nf__deadline-label {
	margin: 0;
	color: rgba(255, 255, 255, 0.75);
	font-family: var(--nf-heading);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.bfhof-nf__deadline {
	margin: 2px 0 10px;
	font-family: var(--nf-heading);
	font-size: 1.75rem;
	font-weight: 900;
	line-height: 1.1;
	text-transform: uppercase;
}

@media (max-width: 860px) {
	.bfhof-nf__intro {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ── Layout: section nav beside the form ─────────────────────────── */

/* The theme sets overflow-x: hidden on html and body, which turns body
 * into a scroll container that never scrolls, so position: sticky can
 * never engage. "clip" hides sideways overflow the same way without
 * creating a scroll container. Only on pages that have this form. */
html:has(.bfhof-nf),
body:has(.bfhof-nf) {
	overflow-x: clip;
}

.bfhof-nf__layout {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	gap: clamp(24px, 4vw, 48px);
	align-items: start;
}

.bfhof-nf__steps {
	position: sticky;
	top: 130px;
}

.bfhof-nf__steps ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bfhof-nf__steps a {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 6px 0;
	color: var(--nf-muted);
	font-family: var(--nf-heading);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	text-transform: uppercase;
}

.bfhof-nf__step-num {
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 30px;
	height: 30px;
	border: 2px solid var(--nf-line);
	border-radius: 50%;
	color: var(--nf-muted);
	font-size: 14px;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.bfhof-nf__steps a:hover,
.bfhof-nf__steps a[aria-current="step"] {
	color: var(--nf-navy);
}

.bfhof-nf__steps a[aria-current="step"] .bfhof-nf__step-num {
	border-color: var(--nf-navy);
	color: var(--nf-navy);
}

.bfhof-nf__steps a.is-complete .bfhof-nf__step-num {
	border-color: var(--nf-navy);
	background: var(--nf-navy);
	color: #fff;
}

@media (max-width: 900px) {
	.bfhof-nf__layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.bfhof-nf__steps {
		display: none;
	}
}

/* ── Sections ────────────────────────────────────────────────────── */

.bfhof-nf__form {
	container-type: inline-size;
	min-width: 0;
}

.bfhof-nf__required-note {
	color: var(--nf-muted);
	font-size: 14px;
}

.bfhof-nf__req {
	color: var(--nf-orange);
	font-weight: 700;
}

.bfhof-nf__section {
	min-width: 0;
	margin: 0 0 28px;
	padding: clamp(20px, 4cqi, 36px);
	border: 1px solid var(--nf-line-soft);
	border-top: 4px solid var(--nf-navy);
	background: #fff;
	scroll-margin-top: 130px;
}

/* A legend cannot be laid out like a heading until it is floated. */
.bfhof-nf__legend {
	float: left;
	width: 100%;
	margin: 0 0 6px;
	padding: 0;
	color: var(--nf-navy);
	font-family: var(--nf-heading);
	font-size: clamp(1.35rem, 1.1rem + 1.2cqi, 1.75rem);
	font-weight: 900;
	line-height: 1.15;
	text-transform: uppercase;
}

.bfhof-nf__legend + * {
	clear: both;
}

.bfhof-nf__legend-num {
	margin-right: 6px;
	color: var(--nf-orange);
}

.bfhof-nf__section-intro {
	max-width: 62ch;
	color: var(--nf-muted);
}

.bfhof-nf__grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 22px 18px;
	margin-top: 18px;
}

.bfhof-nf__field,
.bfhof-nf__or {
	grid-column: span 6;
	min-width: 0;
}

.bfhof-nf__field--half {
	grid-column: span 3;
}

.bfhof-nf__field--third {
	grid-column: span 2;
}

@container (max-width: 560px) {
	.bfhof-nf__field--half,
	.bfhof-nf__field--third {
		grid-column: span 6;
	}
}

/* ── Labels, hints, errors ───────────────────────────────────────── */

.bfhof-nf__label {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	color: var(--nf-navy);
	font-family: var(--nf-heading);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}

.bfhof-nf__hint {
	margin: -2px 0 8px;
	color: var(--nf-muted);
	font-size: 14px;
	line-height: 1.5;
}

.bfhof-nf__error {
	margin: 6px 0 0;
	color: var(--nf-error);
	font-size: 14px;
	font-weight: 600;
}

.bfhof-nf__error[hidden] {
	display: none;
}

/* ── Controls ────────────────────────────────────────────────────── */

.bfhof-nf input[type="text"],
.bfhof-nf input[type="email"],
.bfhof-nf input[type="tel"],
.bfhof-nf select,
.bfhof-nf textarea {
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 11px 14px;
	border: 1px solid var(--nf-line);
	border-radius: 0;
	background: #fff;
	box-shadow: inset 0 1px 2px rgba(9, 46, 99, 0.06);
	color: var(--nf-ink);
	font: inherit;
	/* 16px or more keeps iOS from zooming in on focus. */
	font-size: max(16px, 1rem);
	line-height: 1.4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bfhof-nf textarea {
	min-height: 11lh;
	max-height: 70vh;
	resize: vertical;
	field-sizing: content;
}

.bfhof-nf select {
	appearance: none;
	padding-right: 40px;
	background-image:
		linear-gradient(45deg, transparent 50%, var(--nf-navy) 50%),
		linear-gradient(135deg, var(--nf-navy) 50%, transparent 50%);
	background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
}

.bfhof-nf input:hover,
.bfhof-nf select:hover,
.bfhof-nf textarea:hover {
	border-color: #94a2b8;
}

.bfhof-nf input:focus-visible,
.bfhof-nf select:focus-visible,
.bfhof-nf textarea:focus-visible {
	border-color: var(--nf-navy);
	box-shadow: var(--nf-focus);
	outline: none;
}

.bfhof-nf .is-invalid input:not([type="checkbox"], [type="radio"]),
.bfhof-nf .is-invalid select,
.bfhof-nf .is-invalid textarea,
.bfhof-nf input:not([type="checkbox"], [type="radio"]):user-invalid,
.bfhof-nf select:user-invalid,
.bfhof-nf textarea:user-invalid {
	border-color: var(--nf-error);
	background-color: #fffafa;
}

/* Choice tiles (radio groups, checkbox groups, the confirmation box). */
.bfhof-nf__choices {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.bfhof-nf__choice-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
	gap: 10px;
}

.bfhof-nf__choice {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 48px;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid var(--nf-line);
	background: #fff;
	color: var(--nf-ink);
	font-size: 16px;
	line-height: 1.35;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.bfhof-nf__choice:hover {
	border-color: #94a2b8;
}

.bfhof-nf__choice:has(input:checked) {
	border-color: var(--nf-navy);
	background: #eef3fa;
	box-shadow: inset 0 0 0 1px var(--nf-navy);
}

.bfhof-nf__choice:has(input:focus-visible) {
	box-shadow: var(--nf-focus);
}

.bfhof-nf__choice input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--nf-navy);
}

.bfhof-nf__choice--single {
	align-items: flex-start;
	padding: 14px 16px;
}

.bfhof-nf__choice--single input {
	margin-top: 2px;
}

.bfhof-nf .is-invalid .bfhof-nf__choice {
	border-color: var(--nf-error);
}

/* Files: the native control, restyled as a drop area. */
.bfhof-nf input[type="file"] {
	display: block;
	width: 100%;
	min-height: 64px;
	padding: 12px;
	border: 2px dashed var(--nf-line);
	background: var(--nf-tint);
	color: var(--nf-muted);
	font: inherit;
	font-size: 15px;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.bfhof-nf input[type="file"]:hover,
.bfhof-nf input[type="file"]:focus-visible {
	border-color: var(--nf-navy);
	background: #eef3fa;
	outline: none;
}

.bfhof-nf input[type="file"]:focus-visible {
	box-shadow: var(--nf-focus);
}

.bfhof-nf .is-invalid input[type="file"] {
	border-color: var(--nf-error);
}

.bfhof-nf input[type="file"]::file-selector-button {
	margin-right: 14px;
	padding: 10px 18px;
	border: 0;
	background: var(--nf-navy);
	color: #fff;
	font-family: var(--nf-button);
	font-size: 15px;
	font-weight: var(--nf-button-weight);
	letter-spacing: normal;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.bfhof-nf__file-list {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.bfhof-nf__file-list:empty {
	display: none;
}

.bfhof-nf__file-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
	border-bottom: 1px solid var(--nf-line-soft);
	font-size: 14px;
}

.bfhof-nf__file-name {
	overflow: hidden;
	color: var(--nf-ink);
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bfhof-nf__file-size {
	flex: none;
	color: var(--nf-muted);
}

.bfhof-nf__file-clear {
	margin-left: auto;
	padding: 4px 0;
	border: 0;
	background: none;
	color: var(--nf-orange);
	font: inherit;
	font-size: 14px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* "Type it, or attach it" divider. */
.bfhof-nf__or {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: -6px 0 -10px;
	color: var(--nf-muted);
	font-family: var(--nf-heading);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.bfhof-nf__or::before,
.bfhof-nf__or::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--nf-line-soft);
}

.bfhof-nf__count {
	margin: 6px 0 0;
	color: var(--nf-muted);
	font-size: 13px;
	text-align: right;
}

.bfhof-nf__count.is-over {
	color: var(--nf-error);
	font-weight: 600;
}

/* ── Error summary and notices ───────────────────────────────────── */

.bfhof-nf__summary {
	margin: 0 0 28px;
	padding: 20px 24px;
	border-left: 6px solid var(--nf-error);
	background: var(--nf-error-tint);
	scroll-margin-top: 130px;
}

.bfhof-nf__summary[hidden] {
	display: none;
}

.bfhof-nf__summary:focus {
	outline: 3px solid color-mix(in srgb, var(--nf-error) 35%, transparent);
	outline-offset: 2px;
}

.bfhof-nf__summary-title {
	margin: 0 0 8px;
	color: var(--nf-error);
	font-family: var(--nf-heading);
	font-size: 1.25rem;
	font-weight: 900;
	text-transform: uppercase;
}

.bfhof-nf__summary ul {
	margin: 0;
	padding-left: 1.1em;
}

.bfhof-nf__summary a {
	color: var(--nf-error);
	font-weight: 600;
}

.bfhof-nf__notice {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin: 0 0 24px;
	padding: 14px 18px;
	border-left: 4px solid var(--nf-navy);
	background: var(--nf-tint);
	font-size: 15px;
}

.bfhof-nf__notice p {
	margin: 0;
}

.bfhof-nf__link-button {
	padding: 0;
	border: 0;
	background: none;
	color: var(--nf-orange);
	font: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* Honeypot: off screen for people, still in the form for bots. */
.bfhof-nf__trap {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ── Submit ──────────────────────────────────────────────────────── */

.bfhof-nf__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	margin-top: 8px;
}

.bfhof-nf__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 14px 34px;
	border: 2px solid var(--nf-orange);
	border-radius: 0;
	background: var(--nf-orange);
	color: #fff;
	font-family: var(--nf-button);
	font-size: var(--nf-button-size);
	font-weight: var(--nf-button-weight);
	letter-spacing: normal;
	line-height: 1.1;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bfhof-nf a.bfhof-nf__button {
	color: #fff;
}

/* The theme's reset turns every <button> pink (#c36) on hover and focus;
 * keep the orange underneath the hover fill below. */
.bfhof-nf .bfhof-nf__button:hover,
.bfhof-nf .bfhof-nf__button:focus {
	border-color: var(--nf-orange);
	background: var(--nf-orange);
	color: #fff;
}

/* Same hover as the site's orange CTA buttons (.orange-btn in the child
 * theme): a darker orange slides in from the left. It is a layer behind the
 * label; ::after because ::before is the loading spinner. */
.bfhof-nf__button:not(.bfhof-nf__button--ghost) {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

.bfhof-nf__button:not(.bfhof-nf__button--ghost)::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	box-shadow: inset 0 0 0 var(--nf-orange-dark);
	transition: box-shadow 0.35s cubic-bezier(0.5, 0.25, 0, 1);
}

.bfhof-nf__button:not(.bfhof-nf__button--ghost):hover::after,
.bfhof-nf__button:not(.bfhof-nf__button--ghost):focus-visible::after {
	box-shadow: inset 600px 0 0 var(--nf-orange-dark);
}

.bfhof-nf .bfhof-nf__button:focus-visible {
	outline: 3px solid var(--nf-navy);
	outline-offset: 3px;
}

.bfhof-nf__button--ghost,
.bfhof-nf a.bfhof-nf__button--ghost {
	background: transparent;
	color: var(--nf-orange);
}

.bfhof-nf__button.is-loading {
	cursor: progress;
	opacity: 0.85;
}

.bfhof-nf__button.is-loading::before {
	content: "";
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: bfhof-nf-spin 0.8s linear infinite;
}

@keyframes bfhof-nf-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ── Received / closed ───────────────────────────────────────────── */

.bfhof-nf__done {
	max-width: 720px;
	margin: 0 auto;
	padding: clamp(28px, 5vw, 48px);
	border-top: 4px solid var(--nf-orange);
	background: var(--nf-tint);
}

.bfhof-nf__done:focus {
	outline: none;
}

@media (prefers-reduced-motion: reduce) {
	.bfhof-nf *,
	.bfhof-nf *::before,
	.bfhof-nf *::after {
		transition: none !important;
		animation-duration: 1.5s !important;
	}
}
