/*
 * VA2 Service Selector
 * Task 7: complete front-end selector experience.
 *
 * The component uses Elementor Global Colors / Fonts first so the live
 * implementation can match VA2 Marketing without carrying the prototype palette.
 */

.va2-service-selector {
	/*
	 * Approved VA2 Marketing Elementor globals:
	 * Primary   #1D2D40
	 * Secondary #3D5473
	 * Text      #C8DFFF
	 * Accent    #FFDE59
	 */
	--va2-selector-primary: var(--e-global-color-primary, #1D2D40);
	--va2-selector-secondary: var(--e-global-color-secondary, #3D5473);
	--va2-selector-text: var(--e-global-color-text, #C8DFFF);
	--va2-selector-accent: var(--e-global-color-accent, #FFDE59);

	/* Selector-specific semantic roles. */
	--va2-selector-card-bg: var(--va2-selector-primary);
	--va2-selector-card-text: var(--va2-selector-text);
	--va2-selector-heading: #FFFFFF;
	--va2-selector-option-bg: transparent;
	--va2-selector-option-hover-bg: var(--va2-selector-secondary);
	--va2-selector-border: rgba(200, 223, 255, 0.26);
	--va2-selector-muted: rgba(200, 223, 255, 0.82);
	--va2-selector-soft: rgba(255, 222, 89, 0.08);
	--va2-selector-cta-text: var(--va2-selector-primary);
	--va2-selector-radius: 22px;
	--va2-selector-max-width: 780px;

	width: 100%;
	max-width: 100%;
	color: var(--va2-selector-card-text);
	font-family: var(--e-global-typography-text-font-family, inherit);
	line-height: 1.55;
	overflow-wrap: anywhere;
}

.va2-service-selector *,
.va2-service-selector *::before,
.va2-service-selector *::after {
	box-sizing: border-box;
}

.va2-service-selector__mount {
	width: min(100%, var(--va2-selector-max-width));
	margin-inline: auto;
}

.va2-service-selector__card {
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	border: 1px solid var(--va2-selector-border);
	border-radius: var(--va2-selector-radius);
	background: var(--va2-selector-card-bg);
	color: var(--va2-selector-card-text);
	padding: clamp(22px, 5vw, 42px);
}

.va2-service-selector__progress-row {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 26px;
}

.va2-service-selector__progress {
	flex: 1;
	height: 6px;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(200, 223, 255, 0.12);
}

.va2-service-selector__progress-bar {
	display: block;
	height: 100%;
	width: 20%;
	border-radius: inherit;
	background: var(--va2-selector-accent);
	transition: width 180ms ease;
}

.va2-service-selector__progress-label {
	color: var(--va2-selector-muted);
	font-size: 0.86rem;
	white-space: nowrap;
}

.va2-service-selector__screen {
	animation: va2-selector-enter 180ms ease both;
}

@keyframes va2-selector-enter {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.va2-service-selector__question,
.va2-service-selector__result-title {
	margin: 0;
	color: var(--va2-selector-heading);
	font-family: var(--e-global-typography-primary-font-family, inherit);
	letter-spacing: -0.025em;
	line-height: 1.18;
}

.va2-service-selector__question {
	font-size: clamp(1.5rem, 4vw, 2rem);
}

.va2-service-selector__result-title {
	margin-top: 7px;
	font-size: clamp(1.9rem, 5vw, 2.6rem);
}

.va2-service-selector__help {
	margin: 9px 0 0;
	color: var(--va2-selector-muted);
}

.va2-service-selector__options {
	display: grid;
	gap: 12px;
	margin-top: 26px;
}

.va2-service-selector__option {
	width: 100%;
	border: 1px solid var(--va2-selector-border);
	border-radius: 16px;
	background: var(--va2-selector-option-bg);
	color: var(--va2-selector-card-text);
	padding: 16px 18px;
	text-align: left;
	cursor: pointer;
	transition:
		border-color 150ms ease,
		background-color 150ms ease,
		transform 150ms ease;
}

.va2-service-selector__option:hover,
.va2-service-selector__option:focus-visible {
	border-color: var(--va2-selector-accent);
	background: var(--va2-selector-option-hover-bg);
	transform: translateY(-1px);
	outline: none;
}

.va2-service-selector__option-title {
	display: block;
	font-weight: 700;
}

.va2-service-selector__option-meta {
	display: block;
	margin-top: 2px;
	color: var(--va2-selector-muted);
	font-size: 0.88rem;
}

.va2-service-selector__group-label {
	margin: 26px 0 8px;
	color: var(--va2-selector-accent);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.va2-service-selector__group-label + .va2-service-selector__options {
	margin-top: 0;
}

.va2-service-selector__nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 22px;
}

.va2-service-selector__back,
.va2-service-selector__restart {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--va2-selector-muted);
	padding: 0;
	cursor: pointer;
	text-decoration: none;
}

.va2-service-selector__back:hover,
.va2-service-selector__back:focus-visible,
.va2-service-selector__restart:hover,
.va2-service-selector__restart:focus-visible {
	color: var(--va2-selector-card-text);
	outline: none;
}

.va2-service-selector__result-label {
	color: var(--va2-selector-accent);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.va2-service-selector__result-block {
	padding: 17px 0;
	border-top: 1px solid var(--va2-selector-border);
}

.va2-service-selector__result-block:first-of-type {
	margin-top: 22px;
}

.va2-service-selector__result-block h3 {
	margin: 0 0 6px;
	color: var(--va2-selector-heading);
	font-size: 0.95rem;
}

.va2-service-selector__result-block p {
	margin: 0;
	color: var(--va2-selector-muted);
}

.va2-service-selector__price {
	margin-top: 22px;
	color: var(--va2-selector-heading);
	font-size: clamp(1.25rem, 3vw, 1.65rem);
	font-weight: 800;
	letter-spacing: -0.02em;
}

.va2-service-selector__price-note {
	margin-top: 2px;
	color: var(--va2-selector-muted);
	font-size: 0.9rem;
}

.va2-service-selector__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 26px;
}

.va2-service-selector__button {
	min-height: 48px;
	border-radius: 999px;
	padding: 12px 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid transparent;
	text-decoration: none;
	font-weight: 700;
	cursor: pointer;
}

.va2-service-selector__button--primary {
	background: var(--va2-selector-accent);
	color: var(--va2-selector-cta-text);
}

.va2-service-selector__button--secondary {
	border-color: var(--va2-selector-border);
	background: var(--va2-selector-option-bg);
	color: var(--va2-selector-card-text);
}

.va2-service-selector__button:hover,
.va2-service-selector__button:focus-visible {
	filter: brightness(0.97);
	outline: none;
}

.va2-service-selector__reassurance {
	margin-top: 18px;
	padding: 13px 15px;
	border: 1px solid var(--va2-selector-border);
	border-radius: 12px;
	background: var(--va2-selector-soft);
	color: var(--va2-selector-muted);
	font-size: 0.9rem;
}

.va2-service-selector__restart {
	display: inline-block;
	margin-top: 20px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.va2-service-selector__discussion {
	margin-top: 22px;
	text-align: left;
}

.va2-service-selector__discussion label {
	display: block;
	margin-bottom: 8px;
	color: var(--va2-selector-heading);
	font-weight: 700;
}

.va2-service-selector__discussion textarea {
	width: 100%;
	min-height: 130px;
	resize: vertical;
	border: 1px solid var(--va2-selector-border);
	border-radius: 16px;
	background: var(--va2-selector-option-bg);
	color: var(--va2-selector-card-text);
	padding: 15px 17px;
	font: inherit;
	line-height: 1.5;
	outline: none;
}

.va2-service-selector__discussion textarea:focus {
	border-color: var(--va2-selector-accent);
	background: var(--va2-selector-option-hover-bg);
}

.va2-service-selector__field-help {
	margin: 7px 0 0;
	color: var(--va2-selector-muted);
	font-size: 0.86rem;
}

.va2-service-selector__status {
	margin-top: 14px;
	color: var(--va2-selector-muted);
	font-size: 0.86rem;
}

.va2-service-selector__loading,
.va2-service-selector__noscript {
	margin: 0;
	padding: 24px;
	border: 1px solid var(--va2-selector-border);
	border-radius: var(--va2-selector-radius);
	background: var(--va2-selector-card-bg);
	color: var(--va2-selector-muted);
	text-align: center;
}

@media (max-width: 640px) {
	.va2-service-selector__card {
		padding: 22px 17px;
	}

	.va2-service-selector__progress-row {
		gap: 10px;
	}

	.va2-service-selector__actions {
		flex-direction: column;
	}

	.va2-service-selector__button {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.va2-service-selector *,
	.va2-service-selector *::before,
	.va2-service-selector *::after {
		scroll-behavior: auto !important;
		transition: none !important;
		animation: none !important;
	}
}


.va2-service-selector__status.is-success {
	color: var(--va2-selector-accent);
}

.va2-service-selector__status.is-error {
	color: #b42318;
}


/* Keep all selector content inside the card on every viewport. */
.va2-service-selector__question,
.va2-service-selector__result-title,
.va2-service-selector__result-block p,
.va2-service-selector__option-title,
.va2-service-selector__option-meta,
.va2-service-selector__button,
.va2-service-selector__discussion textarea {
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: normal;
}

.va2-service-selector__actions {
	max-width: 100%;
}

@media (max-width: 640px) {
	.va2-service-selector__progress-row {
		align-items: flex-start;
	}

	.va2-service-selector__progress-label {
		white-space: normal;
		text-align: right;
	}
}
