/* NLD ICM Dash — CreditApp modal forms (quick, NTC, full) */

.nld-quick-form.nld-mode-inline,
.nld-full-form {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r);
	box-shadow: var(--shadow);
	padding: 24px;
	max-width: 480px;
	margin: 0 auto;
}
.nld-full-form { max-width: 640px; }

.nld-form-head { margin-bottom: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.nld-form-head-text { min-width: 0; }
.nld-form-title { font-family: var(--fh); font-size: 20px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 4px; color: var(--text); }
.nld-form-sub { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.55; }

/* Theme toggle on inline full form (no heading row to sit beside). */
.nld-form-toolbar { display: flex; justify-content: flex-end; margin-bottom: 8px; }

/* Compact the theme toggle when it sits in a form heading / modal header. */
.nld-form-head .nld-theme-toggle,
.nld-form-toolbar .nld-theme-toggle,
.nld-modal-head .nld-theme-toggle { width: 34px; height: 34px; font-size: 16px; flex: none; }

.nld-stage-title { font-family: var(--fh); font-size: 19px; font-weight: 800; margin: 0 0 14px; color: var(--text); }
.nld-section-label { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin: 18px 0 10px; }

/* Multi-step stages: only the current stage shows. Uses a class so theme CSS
   that overrides the [hidden] attribute can't accidentally reveal all stages.
   Gated on .js-ready so the form stays usable if JS fails to initialise. */
.nld-full-form.js-ready .nld-stage { display: none; }
.nld-full-form.js-ready .nld-stage.is-current { display: block; }

/* Vehicle context banner */
.nld-vehicle-banner {
	display: flex;
	gap: 12px;
	align-items: center;
	background: var(--s2);
	border: 1px solid var(--border);
	border-radius: var(--r-sm);
	padding: 11px 12px;
	margin-bottom: 16px;
}
.nld-vehicle-thumb {
	width: 72px; height: 52px; flex: none;
	border-radius: 8px;
	background: linear-gradient(135deg, var(--s2), var(--s3));
	background-size: cover; background-position: center;
}
.nld-vehicle-banner-full .nld-vehicle-thumb { width: 88px; height: 60px; }
.nld-vehicle-title { font-weight: 700; font-size: 14px; }
.nld-vehicle-price { color: var(--accent); font-weight: 700; font-size: 14px; }
.nld-vehicle-stock { font-family: var(--fm); font-size: 11.5px; color: var(--muted); }

/* Consent */
.nld-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 14px 0; line-height: 1.5; cursor: pointer; }
.nld-consent input[type=checkbox] { width: 20px; height: 20px; min-height: 20px; flex: none; margin: 0; accent-color: var(--accent); cursor: pointer; }
.nld-consent a { color: var(--accent); }
.nld-consents { margin: 8px 0 4px; }

/* "Your Deal" stage (dealer-only preferences) */
.nld-mono { font-family: var(--fm); letter-spacing: .02em; text-transform: uppercase; }
.nld-stage-intro { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: -4px 0 16px; }
.nld-deal-checks { display: flex; flex-direction: column; gap: 4px; margin: 2px 0 4px; }
.nld-checkbox-line { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--text); margin: 6px 0; cursor: pointer; }
/* display:flex above outranks the UA [hidden] rule, so re-assert it for hidden coverage rows. */
.nld-checkbox-line[hidden] { display: none; }
.nld-checkbox-line input[type=checkbox] { width: 20px; height: 20px; min-height: 20px; flex: none; margin: 0; accent-color: var(--accent); cursor: pointer; }

.nld-submit { width: 100%; margin-top: 6px; min-height: 52px; font-size: 15.5px; }
.nld-recaptcha-note { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--faint); margin: 10px 0 0; justify-content: center; }

.nld-form-error { background: var(--neg-soft); color: var(--neg); border-radius: var(--r-sm); padding: 10px 12px; font-size: 13px; margin: 10px 0; }

/* Stepper + progress */
.nld-stepper { display: flex; gap: 8px; margin-bottom: 12px; }
.nld-step { display: flex; align-items: center; gap: 7px; flex: 1; opacity: .5; }
.nld-step.is-active, .nld-step.is-done { opacity: 1; }
.nld-step-num {
	width: 26px; height: 26px; border-radius: 999px; flex: none;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--track); color: var(--muted); font-size: 13px; font-weight: 700;
}
.nld-step.is-active .nld-step-num, .nld-step.is-done .nld-step-num { background: var(--accent); color: var(--accent-ink); }
.nld-step-label { font-size: 12.5px; font-weight: 600; color: var(--text); }
.nld-progress { height: 5px; background: var(--track); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.nld-progress-fill { height: 100%; background: var(--accent); transition: width .25s ease; }

.nld-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.nld-nav .nld-back { margin-right: auto; }

/* Review summary */
.nld-review-summary { background: var(--s2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px; margin-bottom: 14px; }
.nld-review-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13px; border-bottom: 1px solid var(--border-soft); }
.nld-review-row:last-child { border-bottom: none; }
.nld-review-row .k { color: var(--muted); }
.nld-review-row .v { font-weight: 600; text-align: right; }

.nld-lender-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.nld-lender-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--s2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 11px; font-size: 12.5px; }
.nld-lender-chip img { height: 18px; }

.nld-addl-income[hidden] { display: none; }

/* Success state */
.nld-success { text-align: center; padding: 16px 0; }
.nld-success-check {
	width: 62px; height: 62px; border-radius: 999px; margin: 0 auto 14px;
	background: var(--pos-soft); color: var(--pos);
	display: flex; align-items: center; justify-content: center;
}
.nld-success-title { font-family: var(--fh); font-size: 21px; font-weight: 800; margin: 0 0 6px; }
.nld-success-msg { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0 auto; max-width: 360px; }
.nld-reference { margin-top: 14px; display: inline-block; background: var(--s2); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-family: var(--fm); font-size: 12.5px; }

/* Image triggers */
.nld-image-trigger {
	display: block; width: 100%; border: 1px solid var(--border); border-radius: var(--r-sm);
	overflow: hidden; cursor: pointer; padding: 0; background: var(--s2);
}
.nld-image-trigger img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nld-image-placeholder {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
	min-height: 80px; color: var(--muted); font-weight: 700; font-size: 14px;
	background: linear-gradient(135deg, var(--s2), var(--s3));
}

/* Modal — full-viewport overlay above any site header */
.nld-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; inset: 0; z-index: 2147483647; display: flex; align-items: center; justify-content: center; padding: 16px; margin: 0; }
.nld-modal[hidden] { display: none; }
.nld-modal-scrim { position: fixed; inset: 0; background: var(--scrim); backdrop-filter: blur(3px); }
.nld-modal-box {
	position: relative; background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--r); box-shadow: var(--pop); width: 100%; max-width: 430px;
	max-height: 92vh; overflow: auto;
}
.nld-modal-wide .nld-modal-box { max-width: 640px; }
.nld-modal-head { display: flex; justify-content: flex-start; align-items: center; gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.nld-modal-title { font-family: var(--fh); font-weight: 800; font-size: 16px; margin-right: auto; }
.nld-modal-close { background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; }
.nld-modal-body { padding: 20px; }
.nld-modal-body .nld-quick-form.nld-mode-inline,
.nld-modal-body .nld-full-form { box-shadow: none; border: none; padding: 0; max-width: none; }

/* Popup trigger button: the .nld-icm wrapper scopes the design tokens so the
   button picks up the dealer accent + fonts instead of the theme default. */
.nld-popup-wrap { display: inline-block; }
.nld-popup-trigger { cursor: pointer; padding: 12px 24px; font-size: 15px; }

@media (max-width: 540px) {
	.nld-step-label { display: none; }
}
