/* Lock-In Price dialog ------------------------------------------------------ */
/* Dream Nissan lead-capture modal. One bold move: a dark automotive header band
   with a solid Nissan-red padlock badge (the "you unlocked VIP, now lock it in"
   signature). Everything below it stays quiet - filled inputs, one red CTA.
   Heavy GF-orbital overrides live here because the theme renders the embedded
   form on a 12-col micro-grid with a blue submit; we reclaim both. */

:root {
	--lp-ink:      #0b1220;
	--lp-ink-2:    #16233b;
	--lp-red:      #c3002f;
	--lp-red-dk:   #9b0025;
	--lp-ink-text: #0f1729;
	--lp-steel:    #9fb0c7;
	--lp-muted:    #6b7480;
	--lp-fill:     #f5f6f8;
	--lp-line:     #e2e5ea;
}

/* Hide the packed vehicle passthrough field (GF puts the cssClass on the gfield li). */
.lpl-hidden-field { display: none !important; }

/* ---- shell ---------------------------------------------------------------- */
#lock-price-dialog.lp-dialog {
	border: none;
	padding: 0;
	width: min(560px, 94vw);
	max-width: 560px;
	/* Cap to the viewport and scroll inside so the form stays reachable on small screens. */
	max-height: 95vh;
	max-height: 95dvh;
	overflow-x: hidden;
	overflow-y: auto;
	border-radius: 20px;
	background: #fff;
	color: var(--lp-ink-text);
	box-shadow: 0 30px 80px rgba(6, 10, 20, 0.45);
	font-family: inherit;
}

#lock-price-dialog.lp-dialog::backdrop {
	background: rgba(8, 12, 20, 0.62);
}

@keyframes lp-in {
	from { opacity: 0; transform: translateY(14px) scale(0.98); }
	to   { opacity: 1; transform: none; }
}
#lock-price-dialog.lp-dialog[open] {
	animation: lp-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- header band (the signature) ----------------------------------------- */
.lp-dialog .lp-head {
	position: relative;
	padding: 30px 32px 26px;
	background: radial-gradient(130% 150% at 12% -10%, var(--lp-ink-2) 0%, var(--lp-ink) 62%);
	color: #fff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.lp-dialog .lp-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 13px;
	background: var(--lp-red);
	color: #fff;
	box-shadow: 0 8px 22px rgba(195, 0, 47, 0.42);
}

.lp-dialog .lp-eyebrow {
	margin: 16px 0 7px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--lp-steel);
}

.lp-dialog .lp-title {
	margin: 0 0 9px;
	font-size: 1.625rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.08;
	color: #fff;
}

.lp-dialog .lp-subtitle {
	margin: 0;
	max-width: 40ch;
	font-size: 0.84rem;
	line-height: 1.5;
	color: #aeb9c9;
}

/* ---- close --------------------------------------------------------------- */
.lp-dialog .lp-close-form { position: absolute; top: 14px; right: 14px; margin: 0; }
.lp-dialog .lp-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.08);
	color: #c7d0dc;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.lp-dialog .lp-close:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.lp-dialog .lp-close:focus-visible { outline: 2px solid var(--lp-red); outline-offset: 2px; }

/* ---- body ---------------------------------------------------------------- */
.lp-dialog .lp-wrap { padding: 26px 32px 28px; }
.lp-dialog .lp-wrap:focus { outline: none; }

.lp-dialog .lp-trust {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 18px 0 0;
	font-size: 0.75rem;
	color: var(--lp-muted);
}
.lp-dialog .lp-trust svg { flex: 0 0 auto; color: var(--lp-red); }

/* ---- Gravity Form overrides (orbital) ------------------------------------ */
.lp-dialog .gform_wrapper { margin: 0; }
.lp-dialog .gform_title,
.lp-dialog .gform_description,
.lp-dialog .gform_required_legend { display: none !important; }

/* Reclaim the field grid: orbital lays fields on a 12-col micro-grid, collapsing
   the half-width fields. Force a clean 2-col that stacks on mobile. */
.lp-dialog .gform_fields {
	display: grid !important;
	grid-template-columns: 1fr 1fr !important;
	gap: 15px 14px !important;
}
.lp-dialog .gfield { grid-column: 1 / -1 !important; }
.lp-dialog .gfield--width-half { grid-column: span 1 !important; }
.lp-dialog .gfield.gform_hidden,
.lp-dialog .gfield.gfield--type-honeypot,
.lp-dialog .gform_validation_container { display: none !important; }

/* Labels */
.lp-dialog .gfield_label {
	display: block;
	margin: 0 0 6px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--lp-muted);
}
.lp-dialog .gfield_required { margin-left: 3px; }
.lp-dialog .gfield_required_text,
.lp-dialog .gfield_required_asterisk {
	color: var(--lp-red);
	font-weight: 700;
}

/* Inputs */
.lp-dialog .gfield input,
.lp-dialog .ginput_container input {
	width: 100% !important;
	box-sizing: border-box;
	height: 46px;
	padding: 0 14px;
	border: 1px solid var(--lp-line);
	border-radius: 10px;
	background: var(--lp-fill);
	color: var(--lp-ink-text);
	font-size: 16px; /* 16px keeps iOS from zooming on focus */
	line-height: 1.2;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.lp-dialog .gfield input::placeholder { color: #aab2bd; }
.lp-dialog .gfield input:focus {
	outline: none;
	border-color: var(--lp-red);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(195, 0, 47, 0.15);
}

/* Submit - reclaim orbital's blue primary. */
.lp-dialog .gform_footer {
	margin: 22px 0 0 !important;
	padding: 0 !important;
}
.lp-dialog .gform_footer input[type="submit"],
.lp-dialog .gform_button,
.lp-dialog input.gform_button.button {
	width: 100% !important;
	height: 52px;
	background: var(--lp-red) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 11px !important;
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
	box-shadow: 0 10px 26px rgba(195, 0, 47, 0.28);
}
.lp-dialog .gform_footer input[type="submit"]:hover,
.lp-dialog .gform_button:hover {
	background: var(--lp-red-dk) !important;
}
.lp-dialog .gform_footer input[type="submit"]:active,
.lp-dialog .gform_button:active { transform: translateY(1px); }
.lp-dialog .gform_footer input[type="submit"]:focus-visible,
.lp-dialog .gform_button:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(195, 0, 47, 0.35);
}

/* Disabled state while the GF ajax spinner is showing (set by lock-price.js on submit). */
.lp-dialog .gform_button:disabled,
.lp-dialog input[type="submit"]:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	box-shadow: none;
}
.lp-dialog .gform_ajax_spinner { margin-left: 10px; vertical-align: middle; }

/* Validation */
.lp-dialog .gform_validation_errors {
	margin: 0 0 18px;
	padding: 12px 14px;
	border: 1px solid rgba(195, 0, 47, 0.28);
	border-left: 3px solid var(--lp-red);
	border-radius: 10px;
	background: rgba(195, 0, 47, 0.05);
	box-shadow: none;
}
.lp-dialog .gform_validation_errors .gform_submission_error {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--lp-red);
}
.lp-dialog .gfield_error input { border-color: var(--lp-red) !important; background: #fff; }
.lp-dialog .gfield_validation_message,
.lp-dialog .validation_message {
	margin-top: 6px;
	padding: 0;
	border: none;
	background: none;
	font-size: 0.75rem;
	color: var(--lp-red);
}

/* Confirmation */
.lp-dialog .gform_confirmation_message {
	padding: 8px 4px 4px;
	font-size: 1rem;
	line-height: 1.6;
	text-align: center;
	color: var(--lp-ink-text);
}

/* ---- mobile -------------------------------------------------------------- */
@media (max-width: 480px) {
	.lp-dialog .gform_fields { grid-template-columns: 1fr !important; }
	.lp-dialog .lp-head { padding: 24px 22px 22px; }
	.lp-dialog .lp-wrap { padding: 22px 22px 24px; }
	.lp-dialog .lp-title { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
	#lock-price-dialog.lp-dialog[open] { animation: none; }
	.lp-dialog .gform_button,
	.lp-dialog input,
	.lp-dialog .lp-close { transition: none; }
}
