/*
 * Apply / Nominate form — hand-written CSS (not compiled Tailwind).
 *
 * assets/css/tailwind.css is a static, precompiled build: it only contains
 * the utility classes that existed elsewhere in the theme's PHP at the time
 * it was generated, and this theme has no build step to regenerate it. Any
 * brand-new utility combination used only here would silently render
 * unstyled. So this section is styled entirely by hand, using the same
 * design tokens the rest of the theme uses (--background, --foreground,
 * --accent, --border, --secondary, --brand-pink, --font-heading/body/mono —
 * see :root in tailwind.css).
 *
 * Visual language deliberately mirrors presence-suite.php / events.php:
 * a muted band, an eyebrow + large serif headline, and content in bordered
 * cards on the parchment background.
 */

/* ---------- Section shell ---------- */

.sm-apply {
	border-top: 1px solid hsl(var(--border));
	background: hsl(var(--secondary) / 0.75);
}

.sm-apply__inner {
	max-width: 1400px;
	margin: 0 auto;
	padding: 4rem 1.5rem 5rem;
}
@media (min-width: 1024px) {
	.sm-apply__inner {
		padding: 5.5rem 2.5rem 7rem;
	}
}

/*
 * Tailwind's .hidden is a single-class rule, and this stylesheet loads after
 * tailwind.css — so any element here that sets its own `display` would win
 * over .hidden and refuse to hide (the nominator block, notably). Re-assert
 * it at higher specificity for everything inside this section, since the
 * JS toggle relies on .hidden to switch between apply/nominate.
 */
.sm-apply .hidden {
	display: none;
}

/* ---------- Section header (eyebrow + headline + supporting copy) ---------- */

.sm-apply__header {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin-bottom: 4rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid hsl(var(--border));
}
@media (min-width: 768px) {
	.sm-apply__header {
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
	}
}

.sm-apply__eyebrow {
	margin-bottom: 1rem;
	font-family: var(--font-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.3em;
	color: hsl(var(--accent));
}

.sm-apply__title {
	font-family: var(--font-heading);
	font-size: 3rem;
	font-weight: 700;
	line-height: 0.95;
	letter-spacing: -0.02em;
	color: hsl(var(--foreground));
	margin: 0;
}
@media (min-width: 1024px) {
	.sm-apply__title {
		font-size: 4.5rem;
	}
}

.sm-apply__standfirst {
	max-width: 24rem;
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.625;
	color: hsl(var(--foreground) / 0.7);
	margin: 0;
}

/* ---------- Two-column layout: rail + form card ---------- */

.sm-apply__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	align-items: start;
}
@media (min-width: 1024px) {
	.sm-apply__layout {
		grid-template-columns: 5fr 7fr;
	}
}

/*
 * On narrow screens the form is what people came to do — put it first and
 * let the "what happens next" rail follow, rather than making them scroll
 * past an explainer to reach the first input. Reverts to rail-left on
 * desktop, where both are visible at once.
 */
.sm-apply__card {
	order: 1;
}
.sm-apply__rail {
	order: 2;
}
@media (min-width: 1024px) {
	.sm-apply__rail {
		order: 1;
	}
	.sm-apply__card {
		order: 2;
	}
}

/* ---------- Left rail: process steps ----------
 * Obsidian band, matching the theme's dark Manifesto/Stats sections. Gives
 * the layout real contrast against the parchment card beside it, so the
 * form reads as a designed pair rather than two faint outlines.
 */

.sm-apply__rail {
	background: hsl(var(--foreground));
	padding: 2.25rem 1.75rem;
}
@media (min-width: 1024px) {
	.sm-apply__rail {
		position: sticky;
		top: 7rem;
		padding: 3rem 2.5rem;
	}
}

.sm-apply__rail-title {
	font-family: var(--font-heading);
	font-size: 1.875rem;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: hsl(var(--background));
	margin: 0;
}

.sm-apply__rail-body {
	margin: 1.1rem 0 0;
	font-family: var(--font-body);
	font-size: 0.875rem;
	line-height: 1.7;
	color: hsl(var(--background) / 0.65);
}

.sm-apply__steps {
	list-style: none;
	margin: 2.25rem 0 0;
	padding: 1.75rem 0 0;
	border-top: 1px solid hsl(var(--background) / 0.15);
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
}

.sm-apply__step {
	display: flex;
	gap: 1.1rem;
	align-items: flex-start;
}

.sm-apply__step-num {
	flex-shrink: 0;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.25em;
	color: hsl(var(--brand-pink));
	padding-top: 0.25rem;
}

.sm-apply__step-title {
	font-family: var(--font-body);
	font-size: 0.875rem;
	font-weight: 600;
	color: hsl(var(--background));
	margin: 0;
}

.sm-apply__step-body {
	margin: 0.4rem 0 0;
	font-family: var(--font-body);
	font-size: 0.8125rem;
	line-height: 1.65;
	color: hsl(var(--background) / 0.55);
}

.sm-apply__rail-note {
	margin: 2.25rem 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid hsl(var(--background) / 0.15);
	font-family: var(--font-mono);
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	line-height: 1.9;
	color: hsl(var(--background) / 0.4);
}

/* ---------- Form card ---------- */

.sm-apply__card {
	border: 1px solid hsl(var(--border));
	background: hsl(var(--background));
	box-shadow: 0 1px 2px hsl(var(--foreground) / 0.04), 0 12px 32px -12px hsl(var(--foreground) / 0.10);
	padding: 2rem 1.5rem;
}
@media (min-width: 768px) {
	.sm-apply__card {
		padding: 2.5rem;
	}
}
@media (min-width: 1024px) {
	.sm-apply__card {
		padding: 3rem;
	}
}

/* ---------- Segmented toggle ---------- */

.sm-apply-toggle {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	border: 1px solid hsl(var(--foreground) / 0.18);
	background: hsl(var(--secondary) / 0.85);
	padding: 0.25rem;
	margin-bottom: 2.5rem;
}
@media (min-width: 640px) {
	.sm-apply-toggle {
		grid-template-columns: 1fr 1fr;
	}
}

.sm-apply-toggle__btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 0.9rem 1rem;
	font-family: var(--font-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: hsl(var(--foreground) / 0.55);
	background: transparent;
	border: none;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease;
}
.sm-apply-toggle__btn:hover {
	color: hsl(var(--foreground));
}
.sm-apply-toggle__btn:focus-visible {
	outline: 2px solid hsl(var(--ring));
	outline-offset: -2px;
}
.sm-apply-toggle__btn.is-active {
	background: hsl(var(--foreground));
	color: hsl(var(--background));
}

/* Small dot marker that fills in on the active tab. */
.sm-apply-toggle__dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	border: 1px solid currentColor;
	background: transparent;
	flex-shrink: 0;
	transition: background-color 0.25s ease;
}
.sm-apply-toggle__btn.is-active .sm-apply-toggle__dot {
	background: hsl(var(--brand-pink));
	border-color: hsl(var(--brand-pink));
}

/* ---------- Form fields ---------- */

.sm-apply-form {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

/* Two-up row for short, related fields (name/email, phone/linkedin). */
.sm-apply-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}
@media (min-width: 640px) {
	.sm-apply-row {
		grid-template-columns: 1fr 1fr;
	}
}

.sm-apply-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.sm-apply-label {
	margin-bottom: 0.6rem;
	font-family: var(--font-mono);
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.22em;
	color: hsl(var(--foreground) / 0.65);
}
.sm-apply-label__required {
	color: hsl(var(--accent));
}
.sm-apply-label__optional {
	color: hsl(var(--foreground) / 0.35);
	text-transform: none;
	letter-spacing: 0.05em;
}

.sm-apply-input,
.sm-apply-textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid hsl(var(--foreground) / 0.18);
	background: hsl(var(--secondary) / 0.85);
	padding: 0.9rem 1.1rem;
	font-family: var(--font-body);
	font-size: 0.9375rem;
	color: hsl(var(--foreground));
	outline: none;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
	border-radius: 0;
}

.sm-apply-input::placeholder,
.sm-apply-textarea::placeholder {
	color: hsl(var(--foreground) / 0.4);
}

.sm-apply-input:hover,
.sm-apply-textarea:hover {
	border-color: hsl(var(--foreground) / 0.35);
}

.sm-apply-input:focus,
.sm-apply-textarea:focus {
	border-color: hsl(var(--foreground));
	background: hsl(var(--background));
	box-shadow: 0 0 0 3px hsl(var(--foreground) / 0.06);
}

.sm-apply-textarea {
	resize: vertical;
	min-height: 9rem;
	line-height: 1.65;
}

.sm-apply-hint {
	margin: 0.6rem 0 0;
	font-family: var(--font-body);
	font-size: 0.75rem;
	line-height: 1.6;
	color: hsl(var(--foreground) / 0.5);
}

/* ---------- Nominator block (revealed when nominating) ---------- */

.sm-apply-nominator {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--secondary) / 0.35);
	padding: 1.5rem;
}

.sm-apply-nominator__title {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	font-family: var(--font-mono);
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.25em;
	color: hsl(var(--foreground) / 0.55);
}
.sm-apply-nominator__title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: hsl(var(--border));
}

/* ---------- Submit row ---------- */

.sm-apply-actions {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	align-items: flex-start;
	border-top: 1px solid hsl(var(--border));
	padding-top: 1.75rem;
	margin-top: 0.25rem;
}
@media (min-width: 640px) {
	.sm-apply-actions {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

.sm-apply-submit {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	background: hsl(var(--foreground));
	color: hsl(var(--background));
	border: none;
	padding: 1rem 1.9rem;
	font-family: var(--font-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease;
}
.sm-apply-submit:hover {
	background: hsl(var(--accent));
	color: hsl(var(--accent-foreground));
}
.sm-apply-submit:focus-visible {
	outline: 2px solid hsl(var(--ring));
	outline-offset: 3px;
}
.sm-apply-submit svg {
	transition: transform 0.25s ease;
}
.sm-apply-submit:hover svg {
	transform: translate(2px, -2px);
}

.sm-apply-actions__note {
	font-family: var(--font-body);
	font-size: 0.75rem;
	line-height: 1.6;
	color: hsl(var(--foreground) / 0.5);
	margin: 0;
}

/* ---------- Success / error states ---------- */

.sm-apply-banner {
	border: 1px solid hsl(var(--border));
	background: hsl(var(--background));
	padding: 3rem 2rem;
	text-align: center;
	max-width: 42rem;
	margin: 0 auto;
}
@media (min-width: 1024px) {
	.sm-apply-banner {
		padding: 4.5rem 3rem;
	}
}

.sm-apply-banner__mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	margin: 0 auto 1.75rem;
	border: 1px solid hsl(var(--accent));
	color: hsl(var(--accent));
}

.sm-apply-banner__eyebrow {
	margin: 0 0 1rem;
	font-family: var(--font-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.35em;
	color: hsl(var(--accent));
}

.sm-apply-banner__title {
	font-family: var(--font-heading);
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: hsl(var(--foreground));
	margin: 0;
}
@media (min-width: 1024px) {
	.sm-apply-banner__title {
		font-size: 3.25rem;
	}
}

.sm-apply-banner__body {
	max-width: 30rem;
	margin: 1.5rem auto 0;
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.7;
	color: hsl(var(--foreground) / 0.7);
}

.sm-apply-banner__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 2.25rem;
	padding-bottom: 0.35rem;
	border-bottom: 1px solid hsl(var(--foreground) / 0.35);
	font-family: var(--font-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: hsl(var(--foreground) / 0.8);
	text-decoration: none;
	transition: color 0.2s ease, border-color 0.2s ease;
}
.sm-apply-banner__link:hover {
	color: hsl(var(--foreground));
	border-color: hsl(var(--foreground));
}

.sm-apply-error {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 2rem;
	border: 1px solid hsl(var(--accent) / 0.45);
	border-left: 3px solid hsl(var(--accent));
	background: hsl(var(--accent) / 0.06);
	padding: 1rem 1.25rem;
	font-family: var(--font-body);
	font-size: 0.875rem;
	line-height: 1.6;
	color: hsl(var(--foreground) / 0.85);
}
.sm-apply-error svg {
	flex-shrink: 0;
	color: hsl(var(--accent));
	margin-top: 0.1rem;
}

/* Honeypot — hidden off-screen, not display:none (some bots skip those). */
.sm-apply-honeypot {
	position: absolute;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
