/**
 * Start pages (/dextrading-free/ …) — the two-step lead modal.
 *
 * Same look as /bitfa-futures/'s question modal (assets/fund/css/futures-lead.css,
 * the .fxl-q block), re-scoped under .slq because these pages run the regular
 * site chrome, not the futures funnel, and pulling that whole landing skin in
 * for one modal would ship ~15KB of dead CSS. Colors, radii and the step meter
 * are copied 1:1 so the two funnels read as the same product.
 *
 * One deliberate difference: the phone field. The futures page collects the
 * number on its dark hero, so .fxl-tel is white-on-dark; here it sits inside
 * the white card, so the same layout is redrawn light.
 *
 * Enqueued from templates/start/start-content.php, i.e. it prints in the
 * footer — after Tailwind's main sheet, which is what lets these rules win —
 * and that is fine because the modal is hidden until the CTA is clicked.
 */

/* ── Backdrop: dark, blurred, and NOT an exit ─────────────────────────────
   The component ships cursor-pointer on every backdrop; this one does not
   close the modal (only the ✕ does, and that records a cancel), so it must
   not advertise a click either. start.js simply never binds it. */
.slq-backdrop {
	background: rgba(20, 22, 25, .6);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	cursor: default;
}

.slq {
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(30, 33, 37, .28);
	border: 1px solid #e8eaed;
	max-height: min(88svh, 720px);
	overflow-y: auto;
}

/* The component parks the close glyph outside the box (Tailwind -top-4
   -left-4); bring it inside as the funnel's round button. Logical props map
   to top/right in RTL and out-specificity the utility classes. */
.slq .slq-close {
	inset-block-start: 0;
	inset-inline-start: 0;
	inset-inline-end: auto;
	width: 34px;
	height: 34px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid #e8eaed;
	background: #fff;
	color: #6f7378;
	font-size: 14px;
	cursor: pointer;
	transition: color .2s, border-color .2s, background .2s;
}

.slq .slq-close:hover {
	color: #1e2125;
	border-color: #f7a01d;
	background: rgba(247, 160, 29, .1);
}

/* Forms clear the close button, same clearance as the futures modal. */
.slq .slq-form { margin-top: 44px; }

/* ── Step meter ─────────────────────────────────────────────────────────── */
.slq-progress {
	height: 5px;
	background: #f3f4f6;
	border-radius: 99px;
	overflow: hidden;
	margin: 4px 0 10px;
}

.slq-bar {
	display: block;
	height: 100%;
	background: #f7a01d;
	border-radius: 99px;
	transition: width .35s;
}

.slq-form-1 .slq-bar { width: 50%; }
.slq-form-2 .slq-bar { width: 100%; }

.slq-step {
	margin: 0;
	font-size: 12.5px;
	font-weight: 600;
	color: #f7a01d;
	text-align: center;
}

.slq-title {
	margin: 6px 0 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.8;
	color: #1e2125;
	text-align: center;
}

.slq-sub {
	margin: 0 0 4px;
	font-size: 13px;
	line-height: 1.9;
	color: #6f7378;
	text-align: center;
}

/* ── Phone field: .fxl-tel's layout, light ──────────────────────────────
   Country select + number share one frame so they read as a single input.
   The select carries no name; start.js folds its dial code into
   input[name=mobile] on submit, exactly like futures-lead.js does. */
.slq-tel {
	display: flex;
	align-items: stretch;
	height: 52px;
	border-radius: 10px;
	border: 1px solid #e8eaed;
	background: #f9fafb;
	transition: border-color .2s, background .2s;
}

.slq-tel:focus-within { border-color: #f7a01d; background: #fff; }
.slq-tel.error { border-color: #dc2626; }

.slq-cc {
	/* Last in the field = on the left in RTL, where phone inputs put the
	   country code; the divider sits on the edge facing the number. */
	order: 2;
	flex: none;
	max-width: 116px;
	padding: 0 26px 0 10px;
	border: 0;
	border-inline-start: 1px solid #e8eaed;
	background: transparent;
	color: #1e2125;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	/* Caret drawn here because appearance:none removes the native one. */
	background-image: linear-gradient(45deg, transparent 50%, #a4a8ad 50%), linear-gradient(135deg, #a4a8ad 50%, transparent 50%);
	background-position: 10px calc(50% - 2px), 15px calc(50% - 2px);
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
}

.slq-cc:focus { outline: none; }

.slq-input {
	order: 1;
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	padding: 0 14px;
	border: 0;
	background: transparent;
	color: #1e2125;
	font: inherit;
	font-size: 15px;
	direction: ltr;
	text-align: right;
}

.slq-input::placeholder { color: #a4a8ad; direction: rtl; text-align: right; }
.slq-input:focus { outline: none; }

/* ── Name field (step 2) ────────────────────────────────────────────────── */
.slq-name {
	height: 52px;
	padding: 0 14px;
	border-radius: 10px;
	border: 1px solid #e8eaed;
	background: #f9fafb;
	color: #1e2125;
	font: inherit;
	font-size: 15px;
	transition: border-color .2s, background .2s;
}

.slq-name:focus { outline: none; border-color: #f7a01d; background: #fff; }
.slq-name.error { border-color: #dc2626; }
.slq-name::placeholder { color: #a4a8ad; }

.slq-error {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.8;
	color: #dc2626;
	text-align: start;
}

.slq-error[hidden] { display: none; }

/* ── Submit: the funnel's gradient primary over the legacy .btn ─────────── */
.slq .slq-form .btn {
	height: 50px;
	margin-top: 6px;
	padding: 0 26px;
	width: 100%;
	border: 0;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, #ffb84d 0%, #f7a01d 50%, #de8c0c 100%);
	box-shadow: 0 6px 18px rgba(247, 160, 29, .32);
	transition: filter .2s, transform .2s, box-shadow .2s;
}

.slq .slq-form .btn:hover:not([disabled]) {
	filter: brightness(1.05);
	transform: translateY(-2px);
	box-shadow: 0 10px 26px rgba(247, 160, 29, .42);
}

.slq .slq-form .btn[disabled] {
	background: #f3f4f6;
	color: #a4a8ad;
	box-shadow: none;
	transform: none;
	cursor: not-allowed;
}

/* ── Trust row under the step-1 button, as on the futures hero ──────────── */
.slq-hint {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 14px;
	margin: 6px 0 0;
	font-size: 12.5px;
	line-height: 1.9;
	color: #6f7378;
}

.slq-hint span { white-space: nowrap; }

@media (max-width: 600px) {
	.slq-title { font-size: 15.5px; }
	.slq-tel, .slq-name { height: 48px; }
}

/* ── Cancel guard — same moves as the futures modal ──────────────────────
   A backdrop click shakes the box and rings the ✕, pointing at the only
   exit. Shaking with `transform` is safe: this theme's Tailwind centres the
   modal with the `translate` property (translate-x-1/2 → translate: 50% …),
   so the two never collide. */
.slq--nudge { animation: slq-nudge .45s ease; }

@keyframes slq-nudge {
	0%, 100% { transform: translateX(0); }
	20%      { transform: translateX(-8px); }
	40%      { transform: translateX(8px); }
	60%      { transform: translateX(-5px); }
	80%      { transform: translateX(5px); }
}

.slq .slq-close.slq-close--ring {
	color: #1e2125;
	border-color: #f7a01d;
	background: rgba(247, 160, 29, .16);
	animation: slq-ring 1.1s ease;
}

@keyframes slq-ring {
	0%   { box-shadow: 0 0 0 0 rgba(247, 160, 29, .55); }
	70%  { box-shadow: 0 0 0 10px rgba(247, 160, 29, 0); }
	100% { box-shadow: 0 0 0 0 rgba(247, 160, 29, 0); }
}
