/* ==========================================================================
   Symmetrix Systems — Consultation form (one question at a time)

   Scoped entirely under .symmq so it cannot leak into the rest of the theme.

   THEMES
     .symmq--light   default, for white / light sections
     .symmq--dark    for dark sections, e.g. linear-gradient(135deg,#141a2a,#152652)
     .symmq--auto    follows the visitor's OS setting

   BRAND COLOUR — the only two lines you normally need to touch:
     line 30  light accent
     line 63  dark accent
   If your theme already defines --symm-primary / --symm-primary-dark, those
   win automatically and the hex fallbacks are ignored.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens — light (also the default when no theme class is present)
   -------------------------------------------------------------------------- */
.symmq,
.symmq--light {
	--symmq-accent: var(--symm-primary, #1b45d6);        /* ← light brand colour */
	--symmq-accent-ink: #ffffff;
	--symmq-accent-weak: rgba(27, 69, 214, 0.35);
	--symmq-accent-dim: #b9c2e8;

	--symmq-ink: #10131a;
	--symmq-muted: #6a7180;
	--symmq-line: #e6e7e3;

	--symmq-shell: #f3f3f0;
	--symmq-card: #ffffff;
	--symmq-card-border: #e6e7e3;
	--symmq-card-shadow: 0 20px 45px -32px rgba(16, 19, 26, 0.45);
	--symmq-blur: none;

	--symmq-field: #fafafa;
	--symmq-field-focus: #ffffff;
	--symmq-placeholder: #a6acb8;

	--symmq-danger: #c02626;
	--symmq-danger-bg: #fdecec;
	--symmq-danger-border: #f6cfcf;

	--symmq-success: #17a34a;
	--symmq-success-ink: #0f7a38;
	--symmq-success-bg: #e8f7ee;
	--symmq-success-border: #bfe6cd;

	--symmq-radius: 22px;
	--symmq-radius-sm: 14px;
}

/* --------------------------------------------------------------------------
   2. Tokens — dark
   -------------------------------------------------------------------------- */
.symmq--dark {
	--symmq-accent: var(--symm-primary-dark, #5d8bff);   /* ← dark brand colour */
	--symmq-accent-ink: #0a1020;                          /* near-black on a bright pill */
	--symmq-accent-weak: rgba(93, 139, 255, 0.4);
	--symmq-accent-dim: rgba(93, 139, 255, 0.45);

	--symmq-ink: #eef2fb;
	--symmq-muted: #98a4c2;
	--symmq-line: rgba(255, 255, 255, 0.15);

	--symmq-shell: rgba(255, 255, 255, 0.035);
	--symmq-card: rgba(255, 255, 255, 0.055);
	--symmq-card-border: rgba(255, 255, 255, 0.11);
	--symmq-card-shadow: 0 26px 60px -34px rgba(0, 0, 0, 0.75);
	--symmq-blur: blur(14px);

	--symmq-field: rgba(255, 255, 255, 0.06);
	--symmq-field-focus: rgba(255, 255, 255, 0.1);
	--symmq-placeholder: rgba(238, 242, 251, 0.42);

	--symmq-danger: #ff9494;
	--symmq-danger-bg: rgba(255, 92, 92, 0.12);
	--symmq-danger-border: rgba(255, 92, 92, 0.32);

	--symmq-success: #46d17f;
	--symmq-success-ink: #7ee2a8;
	--symmq-success-bg: rgba(70, 209, 127, 0.12);
	--symmq-success-border: rgba(70, 209, 127, 0.3);
}

/* auto = light by default, dark tokens when the OS asks for them */
@media (prefers-color-scheme: dark) {
	.symmq--auto {
		--symmq-accent: var(--symm-primary-dark, #5d8bff);
		--symmq-accent-ink: #0a1020;
		--symmq-accent-weak: rgba(93, 139, 255, 0.4);
		--symmq-accent-dim: rgba(93, 139, 255, 0.45);

		--symmq-ink: #eef2fb;
		--symmq-muted: #98a4c2;
		--symmq-line: rgba(255, 255, 255, 0.15);

		--symmq-shell: rgba(255, 255, 255, 0.035);
		--symmq-card: rgba(255, 255, 255, 0.055);
		--symmq-card-border: rgba(255, 255, 255, 0.11);
		--symmq-card-shadow: 0 26px 60px -34px rgba(0, 0, 0, 0.75);
		--symmq-blur: blur(14px);

		--symmq-field: rgba(255, 255, 255, 0.06);
		--symmq-field-focus: rgba(255, 255, 255, 0.1);
		--symmq-placeholder: rgba(238, 242, 251, 0.42);

		--symmq-danger: #ff9494;
		--symmq-danger-bg: rgba(255, 92, 92, 0.12);
		--symmq-danger-border: rgba(255, 92, 92, 0.32);

		--symmq-success: #46d17f;
		--symmq-success-ink: #7ee2a8;
		--symmq-success-bg: rgba(70, 209, 127, 0.12);
		--symmq-success-border: rgba(70, 209, 127, 0.3);
	}
}

/* --------------------------------------------------------------------------
   3. Shell
   -------------------------------------------------------------------------- */
.symmq {
	background: var(--symmq-shell);
	border-radius: calc(var(--symmq-radius) + 8px);
	padding: clamp(14px, 2.4vw, 20px);
	height: 100%;
	font-family: inherit;
	color: var(--symmq-ink);
	-webkit-text-size-adjust: 100%;
}

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

.symmq [hidden] {
	display: none !important;
}

/* Screen-reader-only labels */
.symmq__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Honeypot — never shown, never announced */
.symmq__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   4. Eyebrow + alert
   -------------------------------------------------------------------------- */
.symmq__eyebrow {
	margin: 0 0 clamp(12px, 2vw, 18px);
	text-align: center;
	font-size: 0.66rem;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--symmq-muted);
}

.symmq__alert {
	margin: 0 0 14px;
	padding: 12px 16px;
	border-radius: var(--symmq-radius-sm);
	font-size: 0.92rem;
	line-height: 1.45;
	background: var(--symmq-danger-bg);
	color: var(--symmq-danger);
	border: 1px solid var(--symmq-danger-border);
}

.symmq__alert.is-success {
	background: var(--symmq-success-bg);
	color: var(--symmq-success-ink);
	border-color: var(--symmq-success-border);
}

/* --------------------------------------------------------------------------
   5. Panel
   -------------------------------------------------------------------------- */
.symmq__panel {
	position: relative;
	background: var(--symmq-card);
	border: 1px solid var(--symmq-card-border);
	border-radius: var(--symmq-radius);
	padding: clamp(22px, 3.6vw, 38px) clamp(18px, 3.2vw, 40px);
	box-shadow: var(--symmq-card-shadow);
	-webkit-backdrop-filter: var(--symmq-blur);
	backdrop-filter: var(--symmq-blur);
}

/* --------------------------------------------------------------------------
   6. Progress
   -------------------------------------------------------------------------- */
.symmq__head {
	display: none;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin-bottom: clamp(18px, 3vw, 26px);
}

.symmq.is-enhanced .symmq__head {
	display: flex;
}

.symmq__count {
	margin: 0;
	font-size: 0.62rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--symmq-muted);
}

.symmq__dots {
	display: flex;
	align-items: center;
	gap: 7px;
}

.symmq__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--symmq-line);
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.symmq__dot.is-done {
	background: var(--symmq-accent-dim);
}

.symmq__dot.is-current {
	background: var(--symmq-accent);
	transform: scale(1.5);
}

/* --------------------------------------------------------------------------
   7. Steps
   -------------------------------------------------------------------------- */
.symmq__steps {
	display: block;
}

.symmq.is-enhanced .symmq__steps {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: clamp(215px, 30vh, 280px);
}

.symmq__step {
	border: 0;
	margin: 0 0 28px;
	padding: 0;
	min-width: 0; /* stops fieldset forcing overflow on mobile */
	text-align: center;
}

.symmq.is-enhanced .symmq__step {
	display: none;
	margin: 0;
}

.symmq.is-enhanced .symmq__step.is-active {
	display: block;
	animation: symmq-in 0.32s cubic-bezier(0.22, 0.68, 0.35, 1) both;
}

@keyframes symmq-in {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: none; }
}

.symmq__question {
	display: block;
	float: none;
	width: 100%;
	margin: 0 auto 8px;
	padding: 0;
	max-width: 22ch;
	font-size: clamp(1.42rem, 4.4vw, 2.05rem);
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: -0.02em;
	color: var(--symmq-ink);
}

.symmq__hint {
	margin: 0 auto clamp(16px, 2.4vw, 22px);
	max-width: 34ch;
	font-size: 0.88rem;
	line-height: 1.5;
	color: var(--symmq-muted);
}

.symmq__hint a {
	color: var(--symmq-accent);
}

.symmq__question + .symmq__options,
.symmq__question + .symmq__inputs {
	margin-top: clamp(16px, 2.4vw, 22px);
}

/* --------------------------------------------------------------------------
   8. Choice pills
   -------------------------------------------------------------------------- */
.symmq__options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
	max-width: 460px;
	margin-inline: auto;
}

.symmq__pill {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 12px 18px;
	border: 1.5px solid var(--symmq-line);
	border-radius: 999px;
	background: var(--symmq-field);
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.3;
	color: var(--symmq-ink);
	cursor: pointer;
	transition: border-color 0.18s ease, background-color 0.18s ease,
				color 0.18s ease, transform 0.18s ease;
	-webkit-tap-highlight-color: transparent;
}

.symmq--light .symmq__pill {
	background: var(--symmq-card);
}

.symmq__pill input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

@media (hover: hover) {
	.symmq__pill:hover {
		border-color: var(--symmq-accent);
		transform: translateY(-1px);
	}
}

.symmq__pill:has(input:checked),
.symmq__pill.is-checked {
	background: var(--symmq-accent);
	border-color: var(--symmq-accent);
	color: var(--symmq-accent-ink);
}

.symmq__pill:has(input:focus-visible),
.symmq__pill.is-focus {
	outline: 3px solid var(--symmq-accent-weak);
	outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   9. Text inputs
   -------------------------------------------------------------------------- */
.symmq__inputs {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 380px;
	margin-inline: auto;
}

.symmq__input {
	width: 100%;
	padding: 15px 18px;
	border: 1.5px solid var(--symmq-line);
	border-radius: var(--symmq-radius-sm);
	background: var(--symmq-field);
	font-family: inherit;
	font-size: 1.05rem;
	line-height: 1.3;
	text-align: center;
	color: var(--symmq-ink);
	transition: border-color 0.18s ease, background-color 0.18s ease;
}

.symmq__input::placeholder {
	color: var(--symmq-placeholder);
	opacity: 1;
}

.symmq__input:focus {
	outline: none;
	background: var(--symmq-field-focus);
	border-color: var(--symmq-accent);
	box-shadow: 0 0 0 3px var(--symmq-accent-weak);
}

.symmq__input.is-invalid {
	border-color: var(--symmq-danger);
}

/* Chrome forces a white autofill background — repaint it for the dark card */
.symmq--dark .symmq__input:-webkit-autofill,
.symmq--dark .symmq__input:-webkit-autofill:hover,
.symmq--dark .symmq__input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--symmq-ink);
	-webkit-box-shadow: 0 0 0 1000px #1a2340 inset;
	caret-color: var(--symmq-ink);
}

.symmq__error {
	margin: 12px 0 0;
	font-size: 0.85rem;
	color: var(--symmq-danger);
}

/* --------------------------------------------------------------------------
   10. Captcha
   -------------------------------------------------------------------------- */
.symmq__captcha {
	display: flex;
	justify-content: center;
	margin-top: 20px;
	/* reCAPTCHA is a fixed 304px box — scale it down on small screens */
	transform-origin: center top;
}

.symmq.is-enhanced .symmq__captcha {
	display: none;
}

.symmq.is-enhanced.is-last .symmq__captcha {
	display: flex;
}

@media (max-width: 360px) {
	.symmq__captcha {
		transform: scale(0.88);
	}
}

/* --------------------------------------------------------------------------
   11. Navigation
   -------------------------------------------------------------------------- */
.symmq__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: clamp(20px, 3vw, 28px);
}

.symmq__cta,
.symmq__ghost {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 52px;
	padding: 14px 30px;
	border-radius: 999px;
	font-family: inherit;
	font-size: 0.97rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: transform 0.16s ease, opacity 0.16s ease, background-color 0.16s ease;
	-webkit-tap-highlight-color: transparent;
}

.symmq__cta {
	border: 1.5px solid var(--symmq-accent);
	background: var(--symmq-accent);
	color: var(--symmq-accent-ink);
	flex: 1 1 auto;
	max-width: 260px;
}

.symmq__ghost {
	border: 1.5px solid transparent;
	background: transparent;
	color: var(--symmq-muted);
	padding-inline: 16px;
}

.symmq__cta:hover,
.symmq__ghost:hover {
	transform: translateY(-1px);
}

.symmq__ghost:hover {
	color: var(--symmq-ink);
}

.symmq__cta:focus-visible,
.symmq__ghost:focus-visible {
	outline: 3px solid var(--symmq-accent-weak);
	outline-offset: 3px;
}

.symmq__cta[disabled] {
	opacity: 0.6;
	cursor: progress;
	transform: none;
}

/* --------------------------------------------------------------------------
   12. Done panel
   -------------------------------------------------------------------------- */
.symmq__done {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: clamp(260px, 34vh, 330px);
	animation: symmq-in 0.3s ease both;
}

.symmq__typing {
	display: flex;
	gap: 7px;
	margin-bottom: 26px;
}

.symmq__typing span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--symmq-muted);
	animation: symmq-bounce 1.1s infinite ease-in-out;
}

.symmq__typing span:nth-child(2) { animation-delay: 0.16s; }
.symmq__typing span:nth-child(3) { animation-delay: 0.32s; }

@keyframes symmq-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
	30%           { transform: translateY(-6px); opacity: 1; }
}

.symmq__tick {
	width: 72px;
	height: 72px;
	margin-bottom: 22px;
}

.symmq__tick svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke-width: 3.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.symmq__tick-ring {
	stroke: var(--symmq-success);
	stroke-dasharray: 151;
	stroke-dashoffset: 151;
	animation: symmq-draw 0.5s ease forwards;
}

.symmq__tick-mark {
	stroke: var(--symmq-success);
	stroke-dasharray: 40;
	stroke-dashoffset: 40;
	animation: symmq-draw 0.32s 0.4s ease forwards;
}

@keyframes symmq-draw {
	to { stroke-dashoffset: 0; }
}

.symmq__done-title {
	margin: 0 0 6px;
	font-size: clamp(1.3rem, 4vw, 1.7rem);
	font-weight: 700;
	letter-spacing: -0.015em;
	color: var(--symmq-ink);
}

.symmq__done-copy {
	margin: 0;
	max-width: 34ch;
	font-size: 0.94rem;
	line-height: 1.55;
	color: var(--symmq-muted);
}

/* --------------------------------------------------------------------------
   13. Small screens
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
	.symmq {
		padding: 10px;
		border-radius: 20px;
	}

	.symmq__panel {
		padding: 24px 16px 22px;
		border-radius: 18px;
	}

	.symmq__options {
		grid-template-columns: 1fr;
	}

	.symmq__nav {
		flex-direction: column-reverse;
		gap: 6px;
	}

	.symmq__cta {
		width: 100%;
		max-width: none;
	}

	.symmq__ghost {
		width: 100%;
	}
}

/* --------------------------------------------------------------------------
   14. Accessibility
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.symmq *,
	.symmq *::before,
	.symmq *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}

	.symmq__tick-ring,
	.symmq__tick-mark {
		stroke-dashoffset: 0;
	}
}

.symmq__count-current, .symmq__count{ display: none; }