/* ==========================================================================
   "GET WHATEVER YOU WANT"
   Header search trigger + the stepped enquiry dialog.
   ========================================================================== */

/* ---------------- the trigger in the header ---------------- */

.qe-trigger {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
	max-width: 260px;
	padding: 9px 14px;
	font-family: var(--font-body);
	font-size: .84rem;
	font-weight: 500;
	color: var(--muted, #64748b);
	text-align: left;
	background: var(--bg-alt, rgba(15, 23, 42, .05));
	border: 1px solid var(--line, rgba(15, 23, 42, .12));
	border-radius: var(--radius-full, 999px);
	cursor: pointer;
	transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}

.qe-trigger:hover,
.qe-trigger:focus-visible {
	border-color: var(--color-primary);
	color: var(--color-primary);
	background: var(--card, #fff);
}

.qe-trigger svg { flex: none; }
.qe-trigger__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Over a dark hero the trigger goes glassy like the burger next to it. */
body:not(.has-solid-header):not(.error404) .site-header:not(.is-scrolled) .qe-trigger {
	background: rgba(255, 255, 255, .1);
	border-color: rgba(255, 255, 255, .24);
	color: rgba(255, 255, 255, .9);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

body:not(.has-solid-header):not(.error404) .site-header:not(.is-scrolled) .qe-trigger:hover {
	background: rgba(255, 255, 255, .18);
	border-color: rgba(255, 255, 255, .5);
	color: #fff;
}

/* The label costs width the bar does not always have. */
@media (max-width: 1500px) { .qe-trigger { max-width: 210px; } }
@media (max-width: 1340px) {
	.qe-trigger__text { display: none; }
	.qe-trigger { padding: 9px; }
}

/* ---------------- the dialog ---------------- */

.qe {
	position: fixed;
	inset: 0;
	z-index: 1200;
	display: grid;
	place-items: center;
	padding: 20px;
}

.qe[hidden] { display: none; }

.qe__scrim {
	position: absolute;
	inset: 0;
	background: rgba(6, 18, 36, .62);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity .22s ease;
}

.qe.is-open .qe__scrim { opacity: 1; }

.qe__dialog {
	position: relative;
	width: min(620px, 100%);
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 34px 34px 28px;
	background: var(--card, #fff);
	border-radius: var(--radius-xl, 22px);
	box-shadow: 0 30px 70px rgba(6, 18, 36, .3);
	opacity: 0;
	transform: translateY(14px) scale(.985);
	transition: opacity .24s var(--ease-out), transform .24s var(--ease-out);
}

.qe.is-open .qe__dialog { opacity: 1; transform: none; }

.qe__x {
	position: absolute;
	top: 16px;
	right: 16px;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	background: transparent;
	border: 1px solid var(--line, rgba(15, 23, 42, .12));
	border-radius: 50%;
	color: var(--muted, #64748b);
	cursor: pointer;
	transition: color .16s ease, border-color .16s ease;
}

.qe__x:hover { color: var(--color-primary); border-color: var(--color-primary); }

.qe__head { margin-bottom: 24px; padding-right: 44px; }

.qe__eyebrow {
	margin: 0 0 6px;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--color-primary);
}

.qe__title {
	margin: 0 0 8px;
	font-family: var(--font-display);
	font-size: clamp(1.4rem, 3vw, 1.75rem);
	font-weight: 800;
	line-height: 1.2;
	color: var(--ink, #0b1f3a);
}

.qe__sub { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--muted, #64748b); }

.qe__progress {
	display: flex;
	gap: 6px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.qe__dot {
	flex: 1;
	height: 4px;
	border-radius: 999px;
	background: var(--line, rgba(15, 23, 42, .12));
	transition: background-color .25s ease;
}

.qe__dot.is-active { background: var(--color-primary); }
.qe__dot.is-done { background: rgba(var(--color-primary-rgb), .45); }

/* ---------------- steps ---------------- */

.qe__step { display: none; }
.qe__step.is-active { display: block; animation: qe-in .28s var(--ease-out) both; }

@keyframes qe-in {
	from { opacity: 0; transform: translateY(8px); }
}

.qe__label {
	display: block;
	margin: 0 0 9px;
	font-family: var(--font-display);
	font-size: 1.02rem;
	font-weight: 700;
	color: var(--ink, #0b1f3a);
}

.qe__label--sm {
	font-family: var(--font-body);
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--muted, #64748b);
	margin-bottom: 6px;
}

.qe__input {
	width: 100%;
	padding: 12px 14px;
	font-family: var(--font-body);
	font-size: .93rem;
	color: var(--ink, #0b1f3a);
	background: var(--bg, #fff);
	border: 1px solid var(--line, rgba(15, 23, 42, .16));
	border-radius: var(--radius-sm, 10px);
	transition: border-color .16s ease, box-shadow .16s ease;
}

.qe__input:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .16);
}

.qe__input--lg { padding: 15px 16px; font-size: 1rem; }

.qe__input--otp {
	max-width: 220px;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: .34em;
	text-align: center;
	padding: 14px;
}

.qe__input[hidden] { display: none; }

.qe__hint { margin: 10px 0 0; font-size: .82rem; line-height: 1.5; color: var(--muted, #64748b); }

.qe__toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
	padding: 12px 14px;
	font-size: .9rem;
	color: var(--ink-2, #475569);
	background: var(--bg-alt, rgba(15, 23, 42, .04));
	border-radius: var(--radius-sm, 10px);
	cursor: pointer;
}

.qe__toggle input { width: 17px; height: 17px; accent-color: var(--color-primary); cursor: pointer; }

.qe__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.qe__grid[hidden] { display: none; }
.qe__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qe__span { grid-column: 1 / -1; }

.qe__resend {
	margin-top: 14px;
	padding: 0;
	font-family: var(--font-body);
	font-size: .85rem;
	font-weight: 700;
	color: var(--color-primary);
	background: none;
	border: 0;
	text-decoration: underline;
	cursor: pointer;
}

/* ---------------- messages and actions ---------------- */

.qe__msg { margin: 16px 0 0; font-size: .87rem; line-height: 1.5; color: var(--muted, #64748b); min-height: 1.2em; }
.qe__msg.is-error { color: #DC2626; font-weight: 600; }

.qe__actions { display: flex; gap: 10px; margin-top: 22px; }

.qe__btn {
	padding: 13px 26px;
	font-family: var(--font-body);
	font-size: .92rem;
	font-weight: 700;
	border: 0;
	border-radius: var(--radius-full, 999px);
	cursor: pointer;
	transition: background-color .16s ease, transform .16s ease, opacity .16s ease;
}

.qe__btn--primary { margin-left: auto; color: #fff; background: var(--color-primary); }
.qe__btn--primary:hover { background: var(--color-primary-dark, var(--color-primary)); transform: translateY(-1px); }
.qe__btn[disabled] { opacity: .55; pointer-events: none; }

.qe__btn--ghost {
	color: var(--ink-2, #475569);
	background: transparent;
	box-shadow: inset 0 0 0 1px var(--line, rgba(15, 23, 42, .14));
}

.qe__btn--ghost:hover { color: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary); }
.qe__btn--ghost[hidden] { display: none; }

.qe.is-busy .qe__dialog { cursor: progress; }

/* ---------------- the thank-you ---------------- */

.qe__done { text-align: center; padding: 10px 0 6px; }
.qe__done[hidden] { display: none; }

.qe__tick {
	display: grid;
	place-items: center;
	width: 66px;
	height: 66px;
	margin: 0 auto 18px;
	color: #fff;
	background: var(--color-secondary, #00C2A8);
	border-radius: 50%;
}

.qe__doneTitle { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.35rem; color: var(--ink, #0b1f3a); }
.qe__doneText { margin: 0 0 22px; font-size: .93rem; line-height: 1.6; color: var(--muted, #64748b); }
.qe__done .qe__btn--primary { margin: 0 auto; }

/* ---------------- phones ---------------- */

@media (max-width: 620px) {
	.qe { padding: 0; place-items: end stretch; }

	.qe__dialog {
		width: 100%;
		max-height: 92vh;
		padding: 26px 20px 22px;
		border-radius: var(--radius-lg, 20px) var(--radius-lg, 20px) 0 0;
		transform: translateY(28px);
	}

	.qe__grid,
	.qe__grid--2 { grid-template-columns: minmax(0, 1fr); }
	.qe__actions { flex-direction: column-reverse; }
	.qe__btn { width: 100%; }
	.qe__btn--primary { margin-left: 0; }
	.qe__input--otp { max-width: 100%; }
}

/* ---------------- dark mode ---------------- */

[data-theme="dark"] .qe__dialog { background: var(--card, #101a2c); }
[data-theme="dark"] .qe__title,
[data-theme="dark"] .qe__label,
[data-theme="dark"] .qe__doneTitle { color: #fff; }

[data-theme="dark"] .qe__input {
	background: rgba(255, 255, 255, .05);
	border-color: rgba(255, 255, 255, .16);
	color: #fff;
}

[data-theme="dark"] .qe-trigger {
	background: rgba(255, 255, 255, .06);
	border-color: rgba(255, 255, 255, .14);
	color: rgba(255, 255, 255, .8);
}

@media (prefers-reduced-motion: reduce) {
	.qe__scrim, .qe__dialog, .qe__step, .qe__btn, .qe-trigger { transition: none; animation: none; }
}
