/**
 * Specialty Compass Questionnaire
 * Enqueued via functions.php — scoped under .scq-app to avoid leaking into
 * the rest of the Astra child theme.
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&family=Open+Sans:wght@400;500;600;700&display=swap');

.scq-app {
	--scq-accent: #3AA6B9;
	--scq-accent-dark: #2f8898;
	--scq-bg-light: #E9F8F9;
	--scq-white: #FFFFFF;
	--scq-dark: #181823;
	--scq-text-muted: #5b5b66;
	--scq-border: #d7eef0;

	/* CTA / high-emphasis accent — primary buttons and the top result */
	--scq-cta: #F97206;
	--scq-cta-dark: #d96204;
	--scq-cta-tint: #fef1e6;

	--scq-radius-lg: 8px;
	--scq-radius-sm: 4px;

	font-family: 'Open Sans', sans-serif;
	color: var(--scq-dark);
	background-color: var(--scq-bg-light);
	max-width: 780px;
	width: 100%;
	margin: 0 auto;
	padding: clamp(16px, 4vw, 32px) clamp(12px, 4vw, 16px) clamp(32px, 8vw, 64px);
	box-sizing: border-box;
	overflow-x: hidden;
}

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

.scq-app h1,
.scq-app h2,
.scq-app h3,
.scq-app h4 {
	font-family: 'Poppins', sans-serif;
	color: var(--scq-dark);
	margin: 0;
}

.scq-hidden {
	display: none !important;
}

/* Wordmark — transparent PNG/WEBP with teal artwork, so it needs a light
   background (the app's own light-teal bg is pale enough for contrast). */
.scq-logo {
	text-align: center;
	margin-bottom: clamp(20px, 5vw, 28px);
}

.scq-logo img {
	display: inline-block;
	width: 170px;
	max-width: 60%;
	height: auto;
}

/* Panels / cards ("large" containers -> 8px radius) */
.scq-panel {
	background: var(--scq-white);
	border: 1px solid var(--scq-border);
	border-radius: var(--scq-radius-lg);
	padding: clamp(20px, 5vw, 40px) clamp(16px, 4vw, 32px);
	width: 100%;
	box-sizing: border-box;
}

/* Intro — explains the Most/Least format before the first question */
.scq-intro__eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--scq-accent-dark);
	background: var(--scq-bg-light);
	border-radius: var(--scq-radius-sm);
	padding: 6px 12px;
	margin-bottom: 16px;
}

#scq-intro h2 {
	font-size: clamp(22px, 5vw, 28px);
	font-weight: 800;
	line-height: 1.3;
	margin-bottom: 12px;
}

#scq-intro > p {
	font-size: clamp(14px, 3vw, 16px);
	line-height: 1.6;
	color: var(--scq-text-muted);
	margin-bottom: clamp(20px, 5vw, 24px);
}

.scq-intro-legend {
	display: flex;
	flex-direction: column;
	background: var(--scq-bg-light);
	border-radius: var(--scq-radius-sm);
	padding: 8px 18px;
	margin-bottom: 18px;
}

.scq-intro-legend-item {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 14px;
	color: var(--scq-dark);
	padding: 8px 0;
}

.scq-intro-legend-item + .scq-intro-legend-item {
	border-top: 1px solid var(--scq-border);
}

.scq-intro-legend-item .scq-pick-btn {
	pointer-events: none;
}

.scq-intro-note {
	font-size: 13px;
	line-height: 1.6;
	color: var(--scq-text-muted);
	margin-bottom: clamp(20px, 5vw, 24px);
}

#scq-intro .scq-btn {
	width: 100%;
}

/* Contact capture */
.scq-contact__eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--scq-accent-dark);
	background: var(--scq-bg-light);
	border-radius: var(--scq-radius-sm);
	padding: 6px 12px;
	margin-bottom: 16px;
}

#scq-contact h2 {
	font-size: clamp(22px, 5vw, 28px);
	font-weight: 800;
	line-height: 1.3;
	margin-bottom: 12px;
}

#scq-contact > p {
	font-size: clamp(14px, 3vw, 16px);
	line-height: 1.6;
	color: var(--scq-text-muted);
	margin-bottom: clamp(24px, 6vw, 32px);
}

.scq-field {
	margin-bottom: 18px;
}

.scq-field label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: var(--scq-dark);
	margin-bottom: 6px;
}

.scq-field-optional {
	font-weight: 400;
	color: var(--scq-text-muted);
	text-transform: none;
	letter-spacing: normal;
}

.scq-field input {
	width: 100%;
	font-family: 'Open Sans', sans-serif;
	font-size: 15px;
	color: var(--scq-dark);
	background: var(--scq-white);
	border: 1px solid var(--scq-border);
	border-radius: var(--scq-radius-sm);
	padding: 12px 14px;
	min-height: 48px;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.scq-field input:focus {
	outline: none;
	border-color: var(--scq-accent);
	box-shadow: 0 0 0 3px rgba(58, 166, 185, 0.15);
}

.scq-contact-error {
	font-size: 14px;
	font-weight: 600;
	color: #b3261e;
	background: #fdecea;
	border: 1px solid #f3c6c2;
	border-radius: var(--scq-radius-sm);
	padding: 10px 14px;
	margin-bottom: 18px;
}

#scq-contact-form .scq-btn {
	width: 100%;
}

.scq-trust-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 24px;
	margin-top: clamp(20px, 5vw, 28px);
	padding-top: clamp(20px, 5vw, 28px);
	border-top: 1px solid var(--scq-border);
}

.scq-trust-item {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 600;
	color: var(--scq-text-muted);
	white-space: nowrap;
}

.scq-trust-icon {
	flex: 0 0 auto;
	color: var(--scq-accent);
}

/* Buttons (always 4px radius) */
.scq-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: 'Open Sans', sans-serif;
	font-weight: 700;
	font-size: clamp(14px, 3vw, 16px);
	min-height: 48px;
	border: none;
	border-radius: var(--scq-radius-sm);
	padding: 14px clamp(20px, 6vw, 32px);
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

.scq-btn:active {
	transform: scale(0.97);
}

.scq-btn-primary {
	background: var(--scq-cta);
	color: var(--scq-white);
}

.scq-btn-primary:hover {
	background: var(--scq-cta-dark);
}

.scq-btn-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.scq-btn-secondary {
	background: transparent;
	color: var(--scq-accent-dark);
	border: 1px solid var(--scq-accent);
}

.scq-btn-secondary:hover {
	background: var(--scq-accent) !important;
	color: var(--scq-white) !important;
	border-color: var(--scq-accent) !important;
}

/* Next/Previous navigation — deliberately NOT the orange CTA color, since
   stepping through questions isn't a "very important" action. */
.scq-btn-nav {
	background: var(--scq-accent);
	color: var(--scq-white);
}

.scq-btn-nav:hover {
	background: var(--scq-accent-dark);
}

.scq-btn-nav:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.scq-btn-nav-secondary {
	background: transparent;
	color: var(--scq-text-muted);
	border: 1px solid var(--scq-border);
}

.scq-btn-nav-secondary:hover:not(:disabled) {
	border-color: var(--scq-accent);
	color: var(--scq-accent-dark);
}

.scq-btn-nav-secondary:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* Questionnaire */
.scq-progress-row {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	justify-content: flex-end;
	font-size: 12px;
	font-weight: 700;
	color: var(--scq-text-muted);
	margin-bottom: 12px;
}

.scq-progress-track {
	width: 100%;
	height: 8px;
	background: var(--scq-bg-light);
	border-radius: var(--scq-radius-sm);
	overflow: hidden;
	margin-bottom: 32px;
}

.scq-progress-bar {
	height: 100%;
	width: 0%;
	background: var(--scq-accent);
	border-radius: var(--scq-radius-sm);
	transition: width 0.4s ease-out;
}

.scq-question-text {
	font-size: clamp(18px, 4.5vw, 22px);
	font-weight: 700;
	line-height: 1.4;
	margin-bottom: clamp(28px, 8vw, 36px);
}

.scq-column-labels {
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 12px;
	padding: 0 14px;
	margin-bottom: 12px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--scq-text-muted);
}

.scq-column-labels span {
	width: 44px;
	text-align: center;
}

.scq-options {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 36px;
}

/* Option rows ("smaller" container -> 4px radius) */
.scq-option-row {
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 10px;
	background: var(--scq-bg-light);
	border: 1px solid transparent;
	border-radius: var(--scq-radius-sm);
	padding: 12px 14px;
	transition: border-color 0.15s ease;
}

.scq-option-row:hover {
	border-color: var(--scq-accent);
}

.scq-option-text {
	font-size: clamp(13px, 3vw, 15px);
	font-weight: 500;
	color: var(--scq-dark);
	line-height: 1.4;
}

.scq-pick-cell {
	width: 44px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
}

.scq-pick-cell::after {
	content: attr(data-label);
	display: none;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--scq-text-muted);
}

/* Pinned hard against the theme's own button styles (Astra/Elementor apply
   a min-width to bare <button> elements, which stretches border-radius:50%
   into a pill instead of a circle) — aspect-ratio is the failsafe: even if
   something external still forces a wider box, height follows width 1:1. */
.scq-pick-btn {
	box-sizing: border-box;
	width: 28px !important;
	height: 28px !important;
	min-width: 28px !important;
	min-height: 28px !important;
	max-width: 28px !important;
	max-height: 28px !important;
	aspect-ratio: 1 / 1;
	padding: 0 !important;
	margin: 0;
	flex: 0 0 28px;
	border-radius: 50%;
	border: 2px solid #c3d9db;
	background: var(--scq-white);
	color: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.scq-pick-btn--most:hover {
	border-color: var(--scq-accent);
}

.scq-pick-btn--most.is-selected {
	background: var(--scq-accent);
	border-color: var(--scq-accent);
	color: var(--scq-white);
}

.scq-pick-btn--least:hover {
	border-color: var(--scq-dark);
}

.scq-pick-btn--least.is-selected {
	background: var(--scq-dark);
	border-color: var(--scq-dark);
	color: var(--scq-white);
}

/* Only the Next button lives here now (no Previous — the adaptive engine
   has no way to un-wind its exposure state), so push it to the right rather
   than letting it stretch to fill the row. */
.scq-actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
}

.scq-actions .scq-btn-nav {
	flex: 0 0 auto;
	min-width: 160px;
}

@media (min-width: 481px) {
	.scq-actions .scq-btn-nav {
		min-width: 200px;
	}
}

/* Indicative sneak peek (shown once, after question 6) */
.scq-indicative-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 4px 0 clamp(20px, 5vw, 28px);
}

.scq-match-card--indicative {
	justify-content: flex-start;
}

#scq-indicative .scq-btn {
	width: 100%;
}

/* Loading */
.scq-loading {
	text-align: center;
	padding: 80px 32px;
	background: transparent;
	border: none;
}

.scq-spinner {
	width: 56px;
	height: 56px;
	margin: 0 auto 24px;
	border: 4px solid var(--scq-bg-light);
	border-top-color: var(--scq-accent);
	border-radius: 50%;
	animation: scq-spin 0.8s linear infinite;
}

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

.scq-loading h3 {
	font-size: 18px;
	font-weight: 700;
}

/* Results */
.scq-results {
	background: transparent;
	border: none;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.scq-results-summary {
	position: relative;
	overflow: hidden;
	text-align: center;
}

.scq-results-summary::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 6px;
	background: var(--scq-accent);
}

.scq-results-eyebrow {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--scq-accent-dark);
	margin-bottom: 8px;
}

.scq-results-summary h3 {
	font-size: clamp(22px, 6vw, 30px);
	font-weight: 800;
	line-height: 1.3;
	margin-bottom: clamp(20px, 6vw, 24px);
}

.scq-results-summary p {
	font-size: clamp(13px, 3vw, 15px);
	line-height: 1.6;
	color: var(--scq-text-muted);
	max-width: 560px;
	margin: 0 auto;
}

.scq-results-list-panel {
	padding: clamp(20px, 5vw, 32px);
}

.scq-results-list-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}

.scq-results-list-header h3 {
	font-size: 20px;
	font-weight: 700;
}

.scq-match-card {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	background: var(--scq-bg-light);
	border: 1px solid var(--scq-border);
	border-radius: var(--scq-radius-sm);
	padding: clamp(14px, 4vw, 20px);
}

.scq-match-card--top {
	background: var(--scq-cta-tint);
	border: 1px solid var(--scq-cta);
	border-left-width: 4px;
}

.scq-match-card--top .scq-match-score-value {
	color: var(--scq-cta);
}

.scq-match-top-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--scq-white);
	background: var(--scq-cta);
	border-radius: var(--scq-radius-sm);
	padding: 3px 10px;
	margin-bottom: 8px;
}

.scq-match-info {
	flex: 1 1 200px;
	min-width: 0;
}

.scq-match-name {
	font-size: clamp(16px, 4vw, 18px);
	font-weight: 700;
	margin-bottom: 4px;
	word-break: break-word;
}

.scq-match-desc {
	font-size: clamp(13px, 3vw, 14px);
	color: var(--scq-text-muted);
	margin: 0;
}

.scq-match-bar-track {
	margin-top: 12px;
	width: 100%;
	max-width: 260px;
	height: 8px;
	background: var(--scq-white);
	border: 1px solid var(--scq-border);
	border-radius: var(--scq-radius-sm);
	overflow: hidden;
}

.scq-match-bar-fill {
	height: 100%;
	width: 0%;
	background: var(--scq-cta);
	border-radius: var(--scq-radius-sm);
	transition: width 0.1s linear;
}

.scq-match-score {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	flex: 0 0 auto;
}

.scq-match-score-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--scq-text-muted);
}

.scq-match-score-value {
	font-family: 'Poppins', sans-serif;
	font-size: clamp(20px, 5vw, 26px);
	font-weight: 700;
	color: var(--scq-accent-dark);
}

.scq-no-matches {
	text-align: center;
	padding: 40px 20px;
	background: var(--scq-bg-light);
	border: 1px dashed var(--scq-border);
	border-radius: var(--scq-radius-sm);
	color: var(--scq-text-muted);
	font-weight: 600;
}

.scq-more-matches-note {
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: var(--scq-text-muted);
	margin: 14px 0 0;
}

/* Post-submission message — the actual conversion moment, so it gets the
   CTA accent treatment like the top match card. */
.scq-thankyou {
	text-align: center;
	background: var(--scq-cta-tint);
	border: 1px solid var(--scq-cta);
}

.scq-thankyou__eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--scq-cta-dark);
	margin-bottom: 8px;
}

.scq-thankyou h3 {
	font-size: clamp(18px, 4.5vw, 22px);
	font-weight: 800;
	line-height: 1.3;
	margin-bottom: clamp(12px, 4vw, 16px);
}

.scq-thankyou p {
	font-size: clamp(13px, 3vw, 15px);
	line-height: 1.6;
	color: var(--scq-text-muted);
	max-width: 520px;
	margin: 0 auto;
}

.scq-results-footer {
	text-align: center;
	padding: 8px 0 24px;
}

.scq-results-footer .scq-btn {
	width: 100%;
	max-width: 320px;
}

/* ---------------------------------------------------------------- */
/* Results entrance animation                                       */
/* ---------------------------------------------------------------- */

/* Rests invisible until JS adds .scq-animate-in on render (see
   renderSnippet() in questionnaire.js) — real browser rendering, so unlike
   the emailed report there's no client-support fallback to worry about. */
.scq-reveal {
	opacity: 0;
	transform: translateY(16px);
}

.scq-reveal.scq-animate-in {
	animation: scqRevealIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger each panel slightly so they cascade in rather than popping at once. */
.scq-reveal.scq-animate-in:nth-of-type(1) { animation-delay: 0s; }
.scq-reveal.scq-animate-in:nth-of-type(2) { animation-delay: 0.12s; }
.scq-reveal.scq-animate-in:nth-of-type(3) { animation-delay: 0.24s; }

@keyframes scqRevealIn {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.scq-reveal {
		opacity: 1;
		transform: none;
	}

	.scq-reveal.scq-animate-in {
		animation: none;
	}

	.scq-match-bar-fill {
		transition: none;
	}
}

/* ---------------------------------------------------------------- */
/* Responsive                                                       */
/* ---------------------------------------------------------------- */

/* Tablet: tighten spacing, slightly narrower pick columns */
@media (max-width: 768px) {
	.scq-results-list-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* Large phones / small tablets in portrait */
@media (max-width: 640px) {
	.scq-column-labels {
		padding: 0 10px;
	}

	.scq-option-row {
		gap: 8px;
		padding: 10px 12px;
	}
}

/* Phones: stack each option's text above its Most/Least buttons, and show
   inline "Most"/"Least" micro-labels instead of the column header row. */
@media (max-width: 480px) {
	.scq-app {
		padding-left: 8px;
		padding-right: 8px;
	}

	.scq-column-labels {
		display: none;
	}

	/* Trust row: collapse to a single "no spam" reassurance on mobile
	   instead of three items competing for a narrow row. */
	.scq-trust-item {
		display: none;
	}

	.scq-trust-item--mobile {
		display: flex;
	}

	.scq-option-row {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			"text   text"
			"most   least";
		gap: 6px 16px;
		padding: 12px;
	}

	.scq-option-text {
		grid-area: text;
	}

	.scq-pick-cell--most {
		grid-area: most;
	}

	.scq-pick-cell--least {
		grid-area: least;
	}

	.scq-pick-cell {
		width: auto;
		flex-direction: row;
		gap: 8px;
		justify-content: flex-start;
	}

	.scq-pick-cell::after {
		display: block;
	}

	.scq-match-card {
		flex-direction: column;
		align-items: stretch;
	}

	.scq-match-info {
		flex: 1 1 auto;
		width: 100%;
	}

	.scq-match-score {
		flex-direction: row;
		align-items: baseline;
		gap: 8px;
		width: 100%;
		justify-content: space-between;
	}
}

/* Very small phones */
@media (max-width: 360px) {
	.scq-results-summary h3 {
		font-size: 20px;
	}

	.scq-btn {
		padding-left: 16px;
		padding-right: 16px;
	}
}
