/**
 * NPS survey form — mobile-first (attendees fill this in on phones).
 * Markup: includes/shortcode-nps-survey.php
 */

.nps-survey [hidden] {
	display: none !important;
}

.nps-survey {
	--nps-primary: #19a4de;
	--nps-primary-dark: #1489bd;
	--nps-primary-tint: #e8f6fc;
	--nps-accent: #fab500;
	max-width: 640px;
	margin: 0 auto;
	padding: 10vh 0;
	font-family: 'Poppins', -apple-system, 'Segoe UI', sans-serif;
}

.nps-survey__field {
	margin: 0 0 1.5em;
	padding: 0;
	border: 0;
}

.nps-survey__field label,
.nps-survey__field legend,
.nps-survey__checkbox-question {
	display: block;
	font-weight: 600;
	margin-bottom: 0.4em;
}

.nps-survey__req {
	color: #c0392b;
}

.nps-survey__hint {
	font-size: 0.85em;
	margin: 0.3em 0 0;
	opacity: 0.75;
}

.nps-survey input[type="text"],
.nps-survey input[type="email"],
.nps-survey textarea {
	width: 100%;
	padding: 0.6em 0.8em;
	border: 1px solid #c5c5c5;
	border-radius: 6px;
	font: inherit;
	box-sizing: border-box;
}

.nps-survey input:focus,
.nps-survey textarea:focus,
.nps-survey__scale-btn:focus-visible {
	outline: 2px solid var(--nps-primary);
	outline-offset: 1px;
}

/* ── 0–10 scale buttons ─────────────────────────────────────────────────── */

.nps-survey__scale {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.nps-survey__scale-btn {
	flex: 1 0 calc(100% / 6 - 6px); /* wraps 0–5 / 6–10 on narrow phones */
	min-width: 44px;
	min-height: 44px;
	border: 1px solid #c5c5c5;
	border-radius: 6px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

@media (min-width: 480px) {
	.nps-survey__scale {
		flex-wrap: nowrap;
	}
	.nps-survey__scale-btn {
		flex: 1 1 0;
	}
}

.nps-survey__scale-btn:hover {
	border-color: var(--nps-accent);
}

.nps-survey__scale-btn.is-selected {
	background: var(--nps-primary);
	border-color: var(--nps-primary);
	color: #fff;
}

.nps-survey__anchors {
	display: flex;
	justify-content: space-between;
	font-size: 0.8em;
	opacity: 0.75;
	margin-top: 0.4em;
}

.nps-survey__follow-up {
	margin-top: 1em;
}

.nps-survey__follow-up label {
	font-weight: 600;
}

/* ── Yes/No + checkbox ──────────────────────────────────────────────────── */

.nps-survey__radio,
.nps-survey__checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
	font-weight: 400 !important;
	margin-bottom: 0.4em;
	cursor: pointer;
}

.nps-survey__radio input,
.nps-survey__checkbox-label input {
	width: 1.2em;
	height: 1.2em;
	margin-top: 0.15em;
	flex-shrink: 0;
}

/* ── Honeypot (off-screen, not display:none) ────────────────────────────── */

.nps-survey__hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ── Errors ─────────────────────────────────────────────────────────────── */

.nps-survey__error {
	display: none;
	color: #c0392b;
	font-size: 0.85em;
	margin-top: 0.3em;
}

.nps-survey__error.is-visible {
	display: block;
}

.nps-survey__form-error {
	color: #c0392b;
	background: #fdf0ee;
	border: 1px solid #e8c4bd;
	border-radius: 6px;
	padding: 0.8em 1em;
	margin-bottom: 1.2em;
}

/* ── Wizard steps ───────────────────────────────────────────────────────── */

.nps-survey__step {
	animation: nps-step-in 0.25s ease-out;
}

@keyframes nps-step-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

.nps-survey__step-title {
	font-size: 1.4em;
	font-weight: 600;
	margin: 0 0 0.8em;
	color: var(--nps-primary);
}

.nps-survey__step-title:focus {
	outline: none;
}

.nps-survey__intro {
	margin: 0 0 1em;
}

.nps-survey__note {
	font-size: 0.9em;
	opacity: 0.75;
	margin: 1.2em 0 0;
}

.nps-survey__illustration {
	text-align: center;
	margin-bottom: 1.2em;
}

.nps-survey__illustration svg {
	max-height: 140px;
	width: auto;
	height: auto;
}

/* 30% illustration / 70% text columns (feedback step); the answer
   controls that follow the columns block stay full width. */
.nps-survey__columns {
	display: flex;
	align-items: center;
	gap: 1.5em;
	margin-bottom: 1.2em;
}

.nps-survey__columns .nps-survey__illustration {
	flex: 0 0 30%;
	margin-bottom: 0;
}

.nps-survey__columns .nps-survey__illustration svg {
	width: 100%;
	max-height: none;
}

.nps-survey__columns .nps-survey__step-content {
	flex: 1 1 70%;
	min-width: 0;
}

.nps-survey__question-text {
	font-weight: 600;
	margin: 0;
}

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

.nps-survey__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	margin-top: 1.8em;
}

.nps-survey__progress {
	font-size: 0.85em;
	opacity: 0.7;
	text-align: center;
	flex: 1;
}

.nps-survey__success {
	text-align: center;
}

.nps-survey__success .nps-survey__illustration svg {
	max-height: 170px;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.nps-survey__next,
.nps-survey__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	min-height: 48px;
	padding: 0.7em 1.6em;
	border: 0;
	border-radius: 6px;
	background: var(--nps-primary);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}

.nps-survey__next {
	min-width: 8em;
}

.nps-survey__next:hover,
.nps-survey__btn:hover {
	background: var(--nps-primary-dark);
}

.nps-survey__next:disabled,
.nps-survey__back:disabled {
	opacity: 0.7;
	cursor: wait;
}

.nps-survey__btn--secondary {
	background: transparent;
	color: var(--nps-primary-dark);
	border: 1px solid var(--nps-primary);
}

.nps-survey__btn--secondary:hover {
	background: var(--nps-primary-tint);
}

.nps-survey__spinner {
	display: none;
	width: 1em;
	height: 1em;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: nps-spin 0.7s linear infinite;
}

.nps-survey__next.is-loading .nps-survey__spinner {
	display: inline-block;
}

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

/* ── Confirm + success panels ───────────────────────────────────────────── */

.nps-survey__confirm,
.nps-survey__success {
	padding: 1.5em;
	border: 1px solid #d8d8d8;
	border-radius: 6px;
	background: #fafafa;
}

.nps-survey__confirm-actions {
	display: flex;
	flex-direction: column;
	gap: 0.6em;
	margin-top: 1em;
}

@media (min-width: 480px) {
	.nps-survey__confirm-actions {
		flex-direction: row;
	}
}

/* ── Unconfigured notice ────────────────────────────────────────────────── */

.nps-survey--unconfigured {
	padding: 1em 1.2em;
	border: 1px dashed #c5c5c5;
	border-radius: 6px;
	background: #fafafa;
}
