/* TrainHGV Quote Form. Every class is prefixed thgv-qf- and scoped under .thgv-qf
   so Avada's global form/button styles cannot leak in. */

.thgv-qf {
	--qf-ink: #0d2b2d;
	--qf-dark: #16494d;
	--qf-teal: #1e7b82;
	--qf-green: #6ec96b;
	--qf-green-hover: #5cb859;
	--qf-mint: #e7f3eb;
	--qf-mint-2: #f2f7f5;
	--qf-border: #c9d8d6;
	--qf-muted: #4a6466;
	--qf-error: #b42318;
	--qf-error-bg: #fef3f2;
	--qf-head: "Figtree", sans-serif;
	--qf-text: var(--qf-ink);
	--qf-label: var(--qf-ink);
	--qf-help: var(--qf-muted);
	position: relative;
	max-width: none;
	margin: 0 auto;
	text-align: center;
	color: var(--qf-text);
	font-size: 16px;
	line-height: 1.5;
	scroll-margin-top: 120px;
}

.thgv-qf--light {
	--qf-text: #fff;
	--qf-label: #fff;
	--qf-help: #d7e8e5;
}

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

.thgv-qf .thgv-qf-form {
	margin: 0;
	padding: 0;
	/* Layout responds to the form's own width, not the screen's. */
	container: thgv-qf / inline-size;
}

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

.thgv-qf [hidden] {
	display: none !important;
}

/* ---------- Step indicator ---------- */

.thgv-qf .thgv-qf-progress {
	margin: 0 0 20px;
}

.thgv-qf .thgv-qf-steps {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.thgv-qf .thgv-qf-steps__item {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	font-size: 14px;
	font-weight: 700;
	color: var(--qf-dark);
}

.thgv-qf .thgv-qf-steps__item + .thgv-qf-steps__item::before {
	content: "";
	width: 28px;
	margin: 0 6px;
	border-top: 2px dashed var(--qf-border);
}

.thgv-qf .thgv-qf-steps__item > .thgv-qf-steps__num,
.thgv-qf .thgv-qf-steps__item > .thgv-qf-steps__label {
	background: var(--qf-mint-2);
}

.thgv-qf .thgv-qf-steps__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 32px;
	padding-left: 6px;
	border-radius: 999px 0 0 999px;
}

.thgv-qf .thgv-qf-steps__n {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	font-size: 12px;
}

.thgv-qf .thgv-qf-steps__tick {
	display: none;
}

.thgv-qf .thgv-qf-steps__label {
	display: inline-flex;
	align-items: center;
	height: 32px;
	padding: 0 14px 0 6px;
	border-radius: 0 999px 999px 0;
}

.thgv-qf .thgv-qf-steps__item.is-current > span {
	background: var(--qf-teal);
	color: #fff;
}

.thgv-qf .thgv-qf-steps__item.is-current .thgv-qf-steps__n {
	color: var(--qf-teal);
}

.thgv-qf .thgv-qf-steps__item.is-done > span {
	background: var(--qf-green);
	color: var(--qf-ink);
}

.thgv-qf .thgv-qf-steps__item.is-done .thgv-qf-steps__n {
	display: none;
}

.thgv-qf .thgv-qf-steps__item.is-done .thgv-qf-steps__tick {
	display: inline-flex;
	width: 22px;
	height: 22px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #fff;
	color: var(--qf-dark);
}

.thgv-qf .thgv-qf-steps__item.is-done + .thgv-qf-steps__item::before {
	border-top-color: var(--qf-green);
}

/* Mobile progress bar (replaces the pills under 800px). */
.thgv-qf .thgv-qf-bar {
	display: none;
	max-width: 320px;
	margin: 0 auto;
	font-size: 14px;
	font-weight: 700;
	color: var(--qf-label);
}

.thgv-qf .thgv-qf-bar__track {
	display: block;
	height: 6px;
	margin-top: 6px;
	border-radius: 999px;
	background: var(--qf-mint);
	overflow: hidden;
}

.thgv-qf .thgv-qf-bar__fill {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--qf-teal);
	transition: width 0.2s ease;
}

/* ---------- Steps ---------- */

.thgv-qf .thgv-qf-step {
	margin: 0;
	padding: 0;
	border: 0;
}

.thgv-qf .thgv-qf-step.is-in {
	animation: thgv-qf-in 0.2s ease-out;
}

.thgv-qf .thgv-qf-step.is-in-back {
	animation: thgv-qf-in-back 0.2s ease-out;
}

@keyframes thgv-qf-in {
	from { opacity: 0; transform: translateX(16px); }
	to { opacity: 1; transform: none; }
}

@keyframes thgv-qf-in-back {
	from { opacity: 0; transform: translateX(-16px); }
	to { opacity: 1; transform: none; }
}

.thgv-qf .thgv-qf-step__title {
	margin: 0 0 16px;
	padding: 0;
	font-family: var(--qf-head);
	font-size: 24px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--qf-label);
	text-transform: none;
}

.thgv-qf .thgv-qf-step__title:focus {
	outline: none;
}

.thgv-qf .thgv-qf-step__title:focus-visible {
	outline: 3px solid var(--qf-teal);
	outline-offset: 4px;
	border-radius: 4px;
}

/* ---------- Licence cards ---------- */

.thgv-qf .thgv-qf-field--cards {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.thgv-qf .thgv-qf-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	justify-content: center;
	gap: 12px;
}

.thgv-qf .thgv-qf-card {
	position: relative;
	display: block;
	margin: 0;
	cursor: pointer;
}

.thgv-qf .thgv-qf-card__box {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 140px;
	height: 100%;
	padding: 14px 10px 12px;
	border: 1.5px solid var(--qf-border);
	border-radius: 12px;
	background: #fff;
	color: var(--qf-ink);
	transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.thgv-qf .thgv-qf-card:hover .thgv-qf-card__box {
	background: var(--qf-mint);
	transform: translateY(-2px);
}

.thgv-qf .thgv-qf-card__input:checked + .thgv-qf-card__box {
	border-color: var(--qf-dark);
	background: var(--qf-mint-2);
	box-shadow: 0 0 0 3px rgba(22, 73, 77, 0.22);
}

.thgv-qf .thgv-qf-card__input:focus-visible + .thgv-qf-card__box {
	outline: 3px solid var(--qf-teal);
	outline-offset: 3px;
}

.thgv-qf .thgv-qf-card__img {
	display: block;
	/* Grows with the card on wide forms. */
	width: clamp(108px, 38%, 176px);
	max-width: 100%;
	height: auto;
	aspect-ratio: 446 / 154;
	margin: 2px 0 8px;
	object-fit: contain;
}

.thgv-qf .thgv-qf-card__label {
	font-family: var(--qf-head);
	font-size: 17px;
	font-weight: 800;
	line-height: 1.2;
}

.thgv-qf .thgv-qf-card__sub {
	font-size: 13px;
	line-height: 1.3;
	color: var(--qf-muted);
}

.thgv-qf .thgv-qf-card__badge {
	position: absolute;
	top: 8px;
	right: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--qf-dark);
	color: #fff;
	opacity: 0;
	transform: scale(0.6);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.thgv-qf .thgv-qf-card__input:checked + .thgv-qf-card__box .thgv-qf-card__badge {
	opacity: 1;
	transform: none;
}

.thgv-qf .has-error .thgv-qf-card__box {
	border-color: var(--qf-error);
}

/* ---------- Inputs ---------- */

/* Fields fill the form width. On a wide form an odd first field (e.g. name)
   takes a full row and the rest pair up (email + phone side by side). */
.thgv-qf .thgv-qf-fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

@container thgv-qf (min-width: 560px) {
	.thgv-qf .thgv-qf-fields:has(> :nth-child(2)) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.thgv-qf .thgv-qf-fields > :first-child:nth-last-child(odd),
	.thgv-qf .thgv-qf-fields > .thgv-qf-field--cards,
	.thgv-qf .thgv-qf-fields > .thgv-qf-field--textarea,
	.thgv-qf .thgv-qf-fields > .thgv-qf-field--radio {
		grid-column: 1 / -1;
	}
}

.thgv-qf .thgv-qf-field {
	margin: 0;
	min-width: 0;
	text-align: center;
}

.thgv-qf .thgv-qf-label {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--qf-label);
}

.thgv-qf .thgv-qf-optional {
	font-weight: 400;
	color: var(--qf-help);
}

.thgv-qf .thgv-qf-help {
	margin: -2px 0 8px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--qf-help);
}

.thgv-qf .thgv-qf-input {
	display: block;
	width: 100%;
	height: 52px;
	min-height: 52px;
	margin: 0;
	padding: 0 16px;
	border: 1.5px solid var(--qf-border);
	border-radius: 12px;
	background: #fff;
	box-shadow: none;
	color: var(--qf-ink);
	font: inherit;
	font-size: 16px;
	line-height: 1.2;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.thgv-qf .thgv-qf-input--area {
	height: auto;
	padding: 12px 16px;
}

.thgv-qf .thgv-qf-input::placeholder {
	color: #6b8284;
	opacity: 1;
}

.thgv-qf .thgv-qf-input:hover {
	border-color: var(--qf-teal);
}

.thgv-qf .thgv-qf-input:focus {
	outline: none;
	border-color: var(--qf-teal);
	box-shadow: 0 0 0 3px rgba(30, 123, 130, 0.35);
}

.thgv-qf .has-error .thgv-qf-input {
	border-color: var(--qf-error);
	background: var(--qf-error-bg);
}

.thgv-qf .thgv-qf-error {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 6px 0 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--qf-error);
	text-align: left;
	justify-content: center;
}

.thgv-qf--light .thgv-qf-error {
	color: #ffd2cc;
}

.thgv-qf .thgv-qf-error::before {
	content: "!";
	flex: 0 0 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--qf-error);
	color: #fff;
	font-size: 12px;
	line-height: 18px;
	text-align: center;
}

/* Small pill radios, for future questions. */
.thgv-qf .thgv-qf-field--radio {
	border: 0;
	padding: 0;
	min-width: 0;
}

.thgv-qf .thgv-qf-pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.thgv-qf .thgv-qf-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 16px;
	border: 1.5px solid var(--qf-border);
	border-radius: 999px;
	background: #fff;
	color: var(--qf-ink);
	cursor: pointer;
}

.thgv-qf .thgv-qf-pill:has(input:checked) {
	border-color: var(--qf-dark);
	background: var(--qf-mint-2);
}

/* ---------- Summary ---------- */

.thgv-qf .thgv-qf-summary {
	max-width: none;
	margin: 0 auto 16px;
	padding: 12px 16px;
	border: 1.5px solid var(--qf-error);
	border-radius: 12px;
	background: var(--qf-error-bg);
	color: var(--qf-error);
	text-align: left;
	font-size: 15px;
}

.thgv-qf .thgv-qf-summary:focus {
	outline: 3px solid var(--qf-teal);
	outline-offset: 2px;
}

.thgv-qf .thgv-qf-summary p {
	margin: 0 0 4px;
	font-weight: 700;
}

.thgv-qf .thgv-qf-summary ul {
	margin: 0;
	padding: 0 0 0 18px;
}

.thgv-qf .thgv-qf-summary a {
	color: var(--qf-error);
	text-decoration: underline;
}

/* ---------- Buttons ---------- */

.thgv-qf .thgv-qf-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin: 20px 0 0;
}

.thgv-qf .thgv-qf-step--location .thgv-qf-nav,
.thgv-qf .thgv-qf-step--details .thgv-qf-nav {
	justify-content: space-between;
}

.thgv-qf .thgv-qf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 180px;
	height: 54px;
	margin: 0;
	padding: 0 28px;
	border: 0;
	border-radius: 999px;
	background: var(--qf-green);
	box-shadow: none;
	color: var(--qf-ink);
	font-family: var(--qf-head);
	font-size: 17px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.thgv-qf .thgv-qf-btn--submit {
	flex: 1 1 auto;
}

.thgv-qf .thgv-qf-btn:hover {
	background: var(--qf-green-hover);
	color: var(--qf-ink);
}

.thgv-qf .thgv-qf-btn:active {
	transform: translateY(1px);
}

.thgv-qf .thgv-qf-btn:focus-visible,
.thgv-qf .thgv-qf-back:focus-visible,
.thgv-qf a:focus-visible {
	outline: 3px solid var(--qf-teal);
	outline-offset: 3px;
}

.thgv-qf .thgv-qf-btn[disabled] {
	cursor: progress;
	opacity: 0.8;
}

.thgv-qf .thgv-qf-btn__icon {
	flex: 0 0 auto;
}

.thgv-qf .thgv-qf-spin {
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(13, 43, 45, 0.25);
	border-top-color: var(--qf-ink);
	border-radius: 50%;
	animation: thgv-qf-spin 0.7s linear infinite;
}

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

.thgv-qf .thgv-qf-back {
	min-height: 44px;
	margin: 0;
	padding: 0 4px;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--qf-teal);
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-transform: none;
	cursor: pointer;
}

.thgv-qf--light .thgv-qf-back {
	color: #fff;
}

.thgv-qf .thgv-qf-back::before {
	content: "\2190\00a0";
	text-decoration: none;
	display: inline-block;
}

.thgv-qf .thgv-qf-back:hover {
	color: var(--qf-dark);
	background: none;
}

/* ---------- Reassurance + privacy ---------- */

.thgv-qf .thgv-qf-trust {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 18px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	font-weight: 700;
	color: var(--qf-label);
}

.thgv-qf .thgv-qf-trust li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
}

.thgv-qf .thgv-qf-trust svg {
	color: var(--qf-teal);
}

.thgv-qf .thgv-qf-privacy {
	max-width: 560px;
	margin: 10px auto 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--qf-help);
}

.thgv-qf .thgv-qf-privacy a {
	color: inherit;
	text-decoration: underline;
}

.thgv-qf .thgv-qf-turnstile {
	display: flex;
	justify-content: center;
	margin: 4px 0 0;
}

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

/* ---------- Variants ---------- */

.thgv-qf--inline {
	max-width: 640px;
}

.thgv-qf--compact .thgv-qf-cards {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}

.thgv-qf--compact .thgv-qf-card__box {
	min-height: 104px;
	padding: 10px 6px;
}

.thgv-qf--compact .thgv-qf-card__img {
	width: 80px;
	margin-bottom: 4px;
}

.thgv-qf--compact .thgv-qf-card__sub {
	display: none;
}

.thgv-qf--compact .thgv-qf-step__title {
	font-size: 20px;
}

/* ---------- Mobile ---------- */

@media (max-width: 799px) {
	.thgv-qf {
		max-width: none;
	}

	.thgv-qf .thgv-qf-steps {
		display: none;
	}

	.thgv-qf .thgv-qf-bar {
		display: block;
	}

	.thgv-qf .thgv-qf-step__title {
		font-size: 21px;
	}

	.thgv-qf .thgv-qf-cards,
	.thgv-qf--compact .thgv-qf-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.thgv-qf .thgv-qf-card__box {
		min-height: 118px;
		padding: 12px 6px 10px;
	}

	.thgv-qf .thgv-qf-card__img {
		width: 108px;
		margin-bottom: 6px;
	}

	.thgv-qf .thgv-qf-card__label {
		font-size: 16px;
	}

	.thgv-qf .thgv-qf-nav,
	.thgv-qf .thgv-qf-step--location .thgv-qf-nav,
	.thgv-qf .thgv-qf-step--details .thgv-qf-nav {
		flex-direction: column-reverse;
		gap: 8px;
	}

	.thgv-qf .thgv-qf-btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.thgv-qf *,
	.thgv-qf *::before,
	.thgv-qf *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.thgv-qf .thgv-qf-spin {
		animation: thgv-qf-spin 1.5s linear infinite !important;
	}

	.thgv-qf .thgv-qf-card:hover .thgv-qf-card__box {
		transform: none;
	}
}

/* fill container – stops the form shrinking inside centred flex columns */
.thgv-qf{width:100%;max-width:100%;box-sizing:border-box;}
