/**
 * Native Nomination — public form.
 *
 * Deliberately light: inherits the theme's fonts, colours and sizing so the
 * form feels native to the site. Customise through the custom properties on
 * .nn-form-wrap, e.g. in your theme:
 *   .nn-form-wrap { --nn-accent: #008751; --nn-radius: 4px; }
 */

.nn-form-wrap {
	--nn-accent: var(--wp--preset--color--primary, #0a7c55);
	--nn-accent-contrast: #fff;
	--nn-text: inherit;
	--nn-muted: #5f6368;
	--nn-border: rgba(127, 127, 127, 0.45);
	--nn-surface: rgba(127, 127, 127, 0.07);
	--nn-tint: rgba(10, 124, 85, 0.08);
	--nn-error: #b3261e;
	--nn-radius: 10px;
	--nn-gap: 1.25rem;
	max-width: 760px;
	margin-inline: auto;
	scroll-margin-top: 6rem;
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
	.nn-form-wrap {
		--nn-muted: color-mix(in srgb, currentColor 68%, transparent);
		--nn-border: color-mix(in srgb, currentColor 22%, transparent);
		--nn-surface: color-mix(in srgb, currentColor 4%, transparent);
		--nn-tint: color-mix(in srgb, var(--nn-accent) 8%, transparent);
	}
}

.nn-form-wrap *,
.nn-form-wrap *::before,
.nn-form-wrap *::after {
	box-sizing: border-box;
}

.nn-form-wrap .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* JS / no-JS visibility */
.nn-form-wrap:not(.nn-js) .nn-js-only { display: none !important; }
.nn-form-wrap [hidden] { display: none !important; }

.nn-intro { margin-bottom: var(--nn-gap); }

/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.nn-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Progress */
.nn-progress {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	counter-reset: none;
}

.nn-progress__item {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	font-size: 0.8rem;
	color: var(--nn-muted);
	margin: 0;
}

.nn-progress__item::before {
	content: "";
	display: block;
	height: 4px;
	border-radius: 2px;
	background: var(--nn-border);
}

.nn-progress__item.is-done::before,
.nn-progress__item.is-current::before { background: var(--nn-accent); }
.nn-progress__item.is-current { color: inherit; font-weight: 600; }
.nn-progress__num { display: none; }

@media (max-width: 600px) {
	.nn-progress__label { display: none; }
	.nn-progress__item.is-current .nn-progress__label { display: block; white-space: nowrap; }
}

/* Steps */
.nn-step { margin: 0 0 2rem; }
.nn-js[data-mode="multi"] .nn-step { margin-bottom: 0; }

.nn-step__title {
	font-size: 1.5em;
	line-height: 1.25;
	margin: 0 0 1rem;
}

.nn-step__title:focus { outline: none; }
.nn-step__title:focus-visible { outline: 2px solid var(--nn-accent); outline-offset: 4px; }

.nn-step__count {
	display: block;
	font-size: 0.55em;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--nn-muted);
	margin-bottom: 0.35rem;
}

/* Type cards */
.nn-types { border: 0; margin: 0; padding: 0; min-width: 0; }

.nn-types__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.75rem;
}

.nn-type-card {
	position: relative;
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	padding: 0.9rem 1rem;
	border: 1.5px solid var(--nn-border);
	border-radius: var(--nn-radius);
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.nn-type-card:hover { border-color: var(--nn-accent); }

.nn-type-card input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.nn-type-card.is-checked,
.nn-type-card:has(input:checked) {
	border-color: var(--nn-accent);
	background: var(--nn-tint);
	box-shadow: inset 0 0 0 1px var(--nn-accent);
}

.nn-type-card.is-focused,
.nn-type-card:has(input:focus-visible) { outline: 2px solid var(--nn-accent); outline-offset: 2px; }
.nn-type-card__icon { font-size: 1.5rem; line-height: 1; }
.nn-type-card__body { display: flex; flex-direction: column; gap: 0.15rem; }
.nn-type-card__label { font-weight: 600; }
.nn-type-card__desc { font-size: 0.85em; color: var(--nn-muted); line-height: 1.35; }

/* Fields */
.nn-type-group { border: 0; margin: 0; padding: 0; min-width: 0; }

.nn-type-group__legend {
	font-weight: 600;
	font-size: 1.05em;
	padding: 0;
	margin-bottom: 1rem;
}

.nn-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 1rem;
}

.nn-field { grid-column: 1 / -1; margin-bottom: var(--nn-gap); }
.nn-field--half { grid-column: auto; }

@media (max-width: 600px) {
	.nn-fields { grid-template-columns: 1fr; }
}

.nn-label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.nn-req { color: var(--nn-error); margin-left: 0.2em; }
.nn-optional { font-weight: 400; color: var(--nn-muted); font-size: 0.9em; }

.nn-help {
	font-size: 0.9em;
	color: var(--nn-muted);
	margin: 0 0 0.5rem;
}

.nn-form-wrap input[type="text"],
.nn-form-wrap input[type="email"],
.nn-form-wrap input[type="tel"],
.nn-form-wrap input[type="number"],
.nn-form-wrap input[type="date"],
.nn-form-wrap input[type="file"],
.nn-form-wrap select,
.nn-form-wrap textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	font: inherit;
	color: inherit;
	padding: 0.7rem 0.85rem;
	border: 1.5px solid var(--nn-border);
	border-radius: calc(var(--nn-radius) * 0.7);
	background-color: transparent;
	line-height: 1.4;
	min-height: 48px;
}

.nn-form-wrap textarea { min-height: 9rem; resize: vertical; }

.nn-form-wrap input:focus-visible,
.nn-form-wrap select:focus-visible,
.nn-form-wrap textarea:focus-visible {
	outline: 2px solid var(--nn-accent);
	outline-offset: 1px;
	border-color: var(--nn-accent);
}

.nn-field--error input,
.nn-field--error select,
.nn-field--error textarea { border-color: var(--nn-error); }

.nn-error {
	color: var(--nn-error);
	font-size: 0.9em;
	font-weight: 500;
	margin: 0.4rem 0 0;
}

.nn-error::before { content: "⚠ "; }

.nn-counter {
	font-size: 0.85em;
	color: var(--nn-muted);
	margin: 0.35rem 0 0;
	text-align: right;
}

/* Choices */
.nn-choice-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.nn-choices { display: flex; flex-direction: column; gap: 0.5rem; }

.nn-choice {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	cursor: pointer;
}

.nn-choice input {
	width: 1.2rem;
	height: 1.2rem;
	margin: 0.15rem 0 0;
	flex: none;
	accent-color: var(--nn-accent);
}

.nn-choice--single label { font-weight: 400; cursor: pointer; }
.nn-field--consent .nn-choice--single label { font-weight: 500; }

/* Consider */
.nn-consider {
	display: flex;
	gap: 1rem;
	padding: 1.1rem 1.25rem;
	margin: 0 0 1.5rem;
	border-radius: var(--nn-radius);
	background: var(--nn-tint);
	border-left: 4px solid var(--nn-accent);
}

.nn-consider__icon { font-size: 1.6rem; line-height: 1; flex: none; }
.nn-consider__icon.dashicons { width: auto; height: auto; font-size: 1.6rem; }
.nn-consider__title { margin: 0 0 0.35rem; font-size: 1.1em; }
.nn-consider__desc { margin: 0 0 0.5rem; }
.nn-consider__list { margin: 0; padding-left: 1.2rem; }
.nn-consider__list li { margin-bottom: 0.25rem; }

/* Review */
.nn-review { margin-bottom: 1.5rem; }
.nn-review__title { font-size: 1em; margin: 1.25rem 0 0.5rem; }

.nn-review__list {
	display: grid;
	grid-template-columns: minmax(8rem, 30%) 1fr;
	gap: 0.4rem 1rem;
	margin: 0;
	padding: 1rem;
	border: 1px solid var(--nn-border);
	border-radius: var(--nn-radius);
}

.nn-review__list dt { font-weight: 600; }
.nn-review__list dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

@media (max-width: 600px) {
	.nn-review__list { grid-template-columns: 1fr; }
	.nn-review__list dd { margin-bottom: 0.5rem; }
}

/* Navigation & buttons */
.nn-nav {
	display: flex;
	gap: 0.75rem;
	justify-content: flex-end;
	margin-top: 1.5rem;
	flex-wrap: wrap;
}

.nn-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.7rem 1.5rem;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	border-radius: calc(var(--nn-radius) * 0.7);
	border: 1.5px solid var(--nn-accent);
	background: var(--nn-accent);
	color: var(--nn-accent-contrast);
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.15s ease;
}

.nn-button:hover { filter: brightness(0.93); color: var(--nn-accent-contrast); }
.nn-button:focus-visible { outline: 2px solid var(--nn-accent); outline-offset: 3px; }
.nn-button[disabled] { opacity: 0.65; cursor: progress; }

.nn-button--secondary {
	background: transparent;
	color: inherit;
	border-color: var(--nn-border);
	margin-right: auto;
}

.nn-button--secondary:hover { color: inherit; border-color: var(--nn-accent); filter: none; }

/* Error summary */
.nn-error-summary {
	border: 2px solid var(--nn-error);
	border-radius: var(--nn-radius);
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
}

.nn-error-summary:focus { outline: 3px solid rgba(179, 38, 30, 0.35); }
.nn-error-summary__title { font-size: 1.1em; margin: 0 0 0.5rem; color: var(--nn-error); }
.nn-error-summary ul { margin: 0; padding-left: 1.2rem; }
.nn-error-summary a { color: var(--nn-error); font-weight: 500; }

/* Thank-you */
.nn-thankyou {
	text-align: center;
	padding: 2.5rem 1.5rem;
	border: 1px solid var(--nn-border);
	border-radius: var(--nn-radius);
}

.nn-thankyou:focus { outline: none; }

.nn-thankyou__icon {
	width: 3.5rem;
	height: 3.5rem;
	margin: 0 auto 1rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--nn-accent);
	color: var(--nn-accent-contrast);
	font-size: 1.75rem;
	font-weight: 700;
}

.nn-thankyou__title { margin: 0 0 0.75rem; }

.nn-thankyou__ref {
	display: inline-flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 0.75rem 1.25rem;
	margin: 0.5rem 0 1.5rem;
	border-radius: var(--nn-radius);
	background: var(--nn-surface);
	border: 1px dashed var(--nn-border);
}

.nn-thankyou__ref-label { font-size: 0.8em; color: var(--nn-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.nn-thankyou__ref-id { font-size: 1.35em; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; }
.nn-thankyou__next { max-width: 34rem; margin: 0 auto 1.5rem; }
.nn-thankyou__next h3 { font-size: 1em; margin: 0 0 0.35rem; }
.nn-thankyou__actions { margin-bottom: 1.5rem; }
.nn-share__label { font-weight: 600; margin: 0 0 0.5rem; }

.nn-share__list {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nn-share__link {
	display: inline-block;
	padding: 0.45rem 0.9rem;
	border: 1px solid var(--nn-border);
	border-radius: 999px;
	text-decoration: none;
	color: inherit;
	font-size: 0.9em;
}

.nn-share__link:hover { border-color: var(--nn-accent); }
.nn-notice { padding: 1rem; border: 1px solid var(--nn-border); border-radius: var(--nn-radius); }

@media (prefers-reduced-motion: reduce) {
	.nn-form-wrap * { transition: none !important; scroll-behavior: auto !important; }
}
