/**
 * Doon Leads — form styles
 *
 * Every colour and typeface is read from the Elementor kit's global variables
 * with a literal fallback, so the form follows the site's palette instead of
 * carrying a second copy of it. The fallbacks are what doon.studio uses today
 * and only apply where the kit is absent.
 */

.doon-leads {
	--dl-bg: var(--e-global-color-d2f61f7, #0C0404);
	--dl-fg: var(--e-global-color-primary, #FFFFFF);
	--dl-text: var(--e-global-color-text, #F0EDEBCC);
	--dl-accent: var(--e-global-color-accent, #FE122B);
	--dl-line: #FFFFFF30;
	--dl-line-strong: #FFFFFF60;

	--dl-body: var(--e-global-typography-text-font-family, "Questrial"), sans-serif;
	--dl-mono: var(--e-global-typography-accent-font-family, "Fragment Mono"), ui-monospace, monospace;

	font-family: var(--dl-body);
	color: var(--dl-text);

	/* Wide enough for the six project cards to land three-up instead of
	   two-up-plus-orphan, narrow enough that a text input never grows past
	   the length anyone actually types into it. */
	max-width: 960px;
	margin-inline: auto;
}

/* ── Progress ─────────────────────────────────────────────── */

.dl-progress {
	display: flex;
	gap: 8px;
	list-style: none;
	margin: 0 0 40px;
	padding: 0;
}

.dl-progress__item {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	padding-top: 10px;
	border-top: 2px solid var(--dl-line);
	font-family: var(--dl-mono);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: -0.3px;
	opacity: 0.5;
	transition: opacity 0.2s, border-color 0.2s;
}

.dl-progress__item.is-current,
.dl-progress__item.is-done {
	opacity: 1;
	border-top-color: var(--dl-accent);
}

.dl-progress__n {
	color: var(--dl-accent);
}

/* Standing on its own in the page hero: no form beneath it to space away
   from, and the hero's own padding provides the breathing room.

   Deliberately no width of its own. The 960px cap belongs to the form; here
   the bar fills whatever it is placed in, so where it sits and how wide it
   runs stay Elementor's decision — the widget's width control and the
   container it lives in — and can be changed in the editor without touching
   the plugin.

   Two classes, not one: `.doon-leads` sets that cap at equal specificity, so
   a single class would win only on source order, and LiteSpeed combines and
   reorders stylesheets on this site. */
.doon-leads.dl-progress-solo {
	max-width: none;
	width: 100%;
	margin-inline: 0;
}

.dl-progress-solo .dl-progress { margin: 0; }

@media (max-width: 640px) {
	.dl-progress__label { display: none; }
	.dl-progress { gap: 6px; margin-bottom: 28px; }
	.dl-progress-solo { width: 100%; }
}

/* ── Steps ────────────────────────────────────────────────── */

/* Two classes deep on purpose.
   The Elementor kit styles headings as `.elementor-kit-13 h2` — one class and
   one element, which outranks a lone `.dl-step__title` and was overriding the
   size back up to the display scale. Qualifying with the form class outranks
   it in turn, without resorting to !important. */
.doon-leads .dl-step__title {
	font-family: var(--dl-body);
	/* The page carries a full-size H1 of its own now, so this is a
	   sub-heading and is sized like one. At the old clamp it competed with
	   the page title directly above it. */
	font-size: clamp(20px, 2.4vw, 26px);
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: -0.4px;
	color: var(--dl-fg);
	margin: 0 0 8px;
}

.doon-leads .dl-step__hint {
	font-size: 15px;
	line-height: 1.6;
	margin: 0 0 28px;
}

.dl-step.is-busy { opacity: 0.6; pointer-events: none; }

/* ── Project cards ────────────────────────────────────────── */

.dl-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
}

.dl-card {
	position: relative;
	display: block;
	padding: 18px 20px;
	border: 1px solid var(--dl-line);
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s;
}

.dl-card:hover { border-color: var(--dl-line-strong); }

.dl-card input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.dl-card__label {
	display: block;
	color: var(--dl-fg);
	font-size: 17px;
	margin-bottom: 4px;
}

.dl-card__hint {
	display: block;
	font-size: 13px;
	line-height: 1.5;
}

.dl-card:has(input:checked) {
	border-color: var(--dl-accent);
	background: #FE122B14;
}

.dl-card:has(input:focus-visible) {
	outline: 2px solid var(--dl-accent);
	outline-offset: 2px;
}

/* ── Scale questions ──────────────────────────────────────── */

.dl-q {
	border: 0;
	margin: 0 0 26px;
	padding: 0;
}

.doon-leads .dl-q__label {
	display: block;
	color: var(--dl-fg);
	font-size: 16px;
	margin-bottom: 12px;
	padding: 0;
}

.dl-q__note {
	font-style: normal;
	font-family: var(--dl-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: -0.3px;
	opacity: 0.7;
	margin-left: 8px;
}

.dl-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dl-chip {
	position: relative;
	display: inline-block;
	padding: 10px 16px;
	border: 1px solid var(--dl-line);
	font-size: 14px;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.dl-chip:hover { border-color: var(--dl-line-strong); }

.dl-chip input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.dl-chip:has(input:checked) {
	border-color: var(--dl-accent);
	background: var(--dl-accent);
	color: var(--dl-fg);
}

.dl-chip:has(input:focus-visible) {
	outline: 2px solid var(--dl-accent);
	outline-offset: 2px;
}

/* ── Fields ───────────────────────────────────────────────── */

.dl-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
}

.dl-field { display: block; }
.dl-field--wide { grid-column: 1 / -1; }

.doon-leads label.dl-field > span,
.doon-leads .dl-field__label {
	display: block;
	font-family: var(--dl-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: -0.3px;
	margin-bottom: 6px;
}

/* Only the asterisk carries the accent. A label rendered entirely in red reads
   as an error state, which is exactly the wrong thing to say about a field
   nobody has touched yet. */
.doon-leads .dl-req {
	color: var(--dl-accent);
}

/* Country code and number read as one control, so they sit on one line and
   share a baseline. The code is given a fixed share rather than sized to its
   content: country names vary from "BAE" to "Birleşik Krallık", and a select
   that changes width on every choice makes the number jump sideways. */
.dl-phone {
	display: flex;
	gap: 8px;
	align-items: stretch;
}

.dl-phone__cc {
	/* Wide enough for the longest country name in the list. A native select
	   truncates its closed state, and "+90 ·" cut mid-separator reads as a
	   rendering fault rather than a choice. */
	flex: 0 0 220px;
	min-width: 0;
	font-family: var(--dl-mono) !important;
	font-size: 13px !important;
}

.dl-phone__number {
	flex: 1 1 auto;
	min-width: 0;
}

@media (max-width: 520px) {
	.dl-phone { flex-wrap: wrap; }
	.dl-phone__cc { flex-basis: 100%; }
}

/* The field that failed, not just the sentence under the step — on a form this
   long the message and the input can be a screen apart. */
.dl-field .is-invalid,
.dl-phone .is-invalid {
	border-color: var(--dl-accent);
}

.dl-field input,
.dl-field select,
.dl-field textarea {
	width: 100%;
	padding: 12px 14px;
	background: transparent;
	border: 1px solid var(--dl-line);
	border-radius: 0;
	color: var(--dl-fg);
	font-family: var(--dl-body);
	font-size: 15px;
	transition: border-color 0.2s;
}

.dl-field input:focus,
.dl-field select:focus,
.dl-field textarea:focus {
	outline: none;
	border-color: var(--dl-accent);
}

.dl-field textarea { resize: vertical; line-height: 1.6; }

.dl-field select option { background: var(--dl-bg); color: var(--dl-fg); }

/* Honeypot: off-canvas rather than display:none, which some bots skip. */
.dl-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.dl-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 22px 0 0;
	font-size: 14px;
	line-height: 1.6;
	cursor: pointer;
}

.dl-consent input { margin-top: 4px; accent-color: var(--dl-accent); }
.dl-consent a { color: var(--dl-accent); }

.dl-turnstile { margin-top: 20px; }

/* ── Actions ──────────────────────────────────────────────── */

.dl-actions {
	display: flex;
	gap: 10px;
	margin-top: 32px;
	flex-wrap: wrap;
}

.doon-leads .dl-btn {
	font-family: var(--dl-mono);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: -0.3px;
	color: var(--dl-bg);
	background: var(--dl-fg);
	border: 1px solid var(--dl-line);
	border-radius: 0;
	padding: 14px 20px;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.doon-leads .dl-btn:hover:not(:disabled) {
	background: var(--dl-accent);
	color: var(--dl-fg);
	border-color: var(--dl-accent);
}

.doon-leads .dl-btn:disabled { opacity: 0.5; cursor: default; }

.doon-leads .dl-btn--ghost {
	background: transparent;
	color: var(--dl-text);
}

.doon-leads .dl-btn--ghost:hover:not(:disabled) {
	background: transparent;
	color: var(--dl-fg);
	border-color: var(--dl-line-strong);
}

/* ── Errors ───────────────────────────────────────────────── */

.dl-error {
	margin: 20px 0 0;
	padding: 12px 14px;
	border-left: 2px solid var(--dl-accent);
	background: #FE122B14;
	color: var(--dl-fg);
	font-size: 14px;
	line-height: 1.5;
}

/* ── Done ─────────────────────────────────────────────────── */

.dl-done {
	text-align: center;
	padding: 40px 0;
}

/* ── Small screens ────────────────────────────────────────── */

@media (max-width: 640px) {
	/* Side-by-side buttons wrap to two cramped half-rows at this width.
	   Full-width stacked, with the primary action first in the reading
	   order it already has in the markup, is one clear tap target each. */
	.dl-actions {
		flex-direction: column-reverse;
		gap: 8px;
		margin-top: 28px;
	}

	.doon-leads .dl-actions .dl-btn { width: 100%; }

	.dl-cards { gap: 8px; }
	.dl-card { padding: 15px 16px; }
	.dl-q { margin-bottom: 22px; }
	.doon-leads .dl-step__hint { margin-bottom: 22px; }

	/* Anything under 16px makes iOS Safari zoom the page on focus and never
	   zoom back out, which strands the visitor mid-form. */
	.dl-field input,
	.dl-field select,
	.dl-field textarea { font-size: 16px; }
}

/* Turnstile renders a fixed 300px widget; below that it overflows the page. */
@media (max-width: 340px) {
	.dl-turnstile { transform: scale(0.9); transform-origin: left top; }
}

/* ── Booking ──────────────────────────────────────────────── */

/* Google serves this frame on a light background and a cross-origin
   document cannot be restyled, so the calendar is boxed and given room
   rather than fought with. */
.dl-booking {
	margin-top: 36px;
	padding-top: 28px;
	border-top: 1px solid var(--dl-line);
}

.dl-booking__title {
	margin: 0 0 6px;
	font-family: var(--dl-body);
	font-size: 1.05rem;
	color: var(--dl-fg);
}

.dl-booking__hint {
	margin: 0 0 18px;
	font-size: .92rem;
	opacity: .75;
}

/* The calendar itself is injected here by Cal.com's embed, which sizes its own
   iframe as the view changes. The height below only reserves room for the
   moment before it arrives; anything taller leaves a gap under the calendar
   once it has settled.

   The background stays transparent on purpose. A colour here shows as a slab
   around the embed — the calendar paints its own surface. */
.dl-booking__frame {
	display: block;
	width: 100%;
	min-height: 420px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	overflow: hidden;
}

.dl-booking__frame iframe {
	display: block;
	width: 100%;
	border: 0;
}

/* The calendar needs more vertical room once it stacks. */
@media (max-width: 640px) {
	.dl-booking__frame { min-height: 760px; }
}

.dl-booking__fallback {
	margin: 14px 0 0;
	font-size: .88rem;
}

/* A way out if the frame fails, not a call to action: the calendar above is
   what someone is meant to reach for. */
.dl-booking__fallback a {
	color: var(--dl-text);
	opacity: .6;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: opacity .2s;
}

.dl-booking__fallback a:hover {
	opacity: 1;
	color: var(--dl-fg);
}

/* ── Done: back to the site ───────────────────────────────── */

.dl-done__home {
	margin: 36px 0 0;
}

/* .dl-btn is written for <button>; an anchor needs the box behaviour spelled
   out or the padding collapses. */
.doon-leads .dl-done__home .dl-btn {
	display: inline-block;
	text-decoration: none;
}
