/*
 * NLS lead-capture forms — one pattern for every screen that collects a lead.
 * Created 2026-09-23 (Chris: "We need uniform design for all lead gathering pages,
 * all different designs"). Five surfaces had drifted apart because they live in three
 * codebases: nls-crm-next (Complete New Lead, Buyer details editor),
 * nls-market-analysis (Add a lead — buyer/seller), nls-transactions (Deal information).
 *
 * Tokens follow the NLS Brand Book v1.2: Fraunces display serif, Plus Jakarta Sans for
 * everything else, accent #C4002E, radii 10/16/999.
 *
 * Usage: add class .nls-lf to the form/modal root. Everything below is scoped to it, so
 * adding the class cannot leak into the surrounding page.
 */
.nls-lf {
	--lf-accent:#C4002E; --lf-accent-hi:#E2003F;
	--lf-ink:#1A1A1A; --lf-slate:#3C3F59; --lf-muted:#5B6472;
	--lf-line:#DFE3EF; --lf-line-soft:#EDEFF5;
	--lf-surface:#FFFFFF; --lf-surface-soft:#F4F6FA; --lf-wash:#FFF5F7;
	--lf-r-sm:10px; --lf-r-md:16px; --lf-r-pill:999px;
	--lf-font:"Plus Jakarta Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
	--lf-display:"Fraunces",Georgia,serif;
	font-family:var(--lf-font); color:var(--lf-ink);
}

/* ── Header: red eyebrow + serif title + one line of help ─────────────────── */
.nls-lf__eyebrow{ margin:0 0 6px; font:700 11.5px/1.2 var(--lf-font); letter-spacing:.12em;
	text-transform:uppercase; color:var(--lf-accent); }
.nls-lf__title{ margin:0; font:600 30px/1.15 var(--lf-display); color:var(--lf-ink); letter-spacing:-.01em; }
.nls-lf__sub{ margin:8px 0 0; font:400 14px/1.5 var(--lf-font); color:var(--lf-muted); }
.nls-lf__head{ padding:28px 32px 20px; border-bottom:1px solid var(--lf-line-soft); position:relative; }

/* ── Sections: a hairline and a small-caps heading. No boxes, no grey panels. ── */
.nls-lf__section{ padding:22px 32px 4px; }
.nls-lf__section + .nls-lf__section{ border-top:1px solid var(--lf-line-soft); }
.nls-lf__legend{ margin:0 0 14px; font:700 11.5px/1.2 var(--lf-font); letter-spacing:.1em;
	text-transform:uppercase; color:var(--lf-slate); }
.nls-lf__hint{ margin:-6px 0 14px; font:400 12.5px/1.5 var(--lf-font); color:var(--lf-muted); }

/* ── Grid: two columns that collapse to one on a phone ────────────────────── */
.nls-lf__grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 18px; }
.nls-lf__grid--1{ grid-template-columns:minmax(0,1fr); }
.nls-lf__field--wide{ grid-column:1 / -1; }
@media (max-width:640px){ .nls-lf__grid{ grid-template-columns:minmax(0,1fr); } }

/* ── Fields: ONE label style (sentence case), ONE input style ─────────────── */
.nls-lf__field{ min-width:0; display:flex; flex-direction:column; gap:6px; }
.nls-lf__label{ font:600 13px/1.3 var(--lf-font); color:var(--lf-slate); }
.nls-lf__label .req{ color:var(--lf-accent); margin-left:2px; }
.nls-lf input[type=text], .nls-lf input[type=email], .nls-lf input[type=tel],
.nls-lf input[type=number], .nls-lf input[type=search], .nls-lf select, .nls-lf textarea{
	width:100%; box-sizing:border-box; min-height:44px; padding:10px 13px;
	border:1px solid var(--lf-line); border-radius:var(--lf-r-sm); background:var(--lf-surface);
	font:400 14.5px/1.4 var(--lf-font); color:var(--lf-ink); transition:border-color .14s ease, box-shadow .14s ease;
}
.nls-lf textarea{ min-height:96px; resize:vertical; }
.nls-lf input::placeholder, .nls-lf textarea::placeholder{ color:#9AA1B1; }
.nls-lf input:focus, .nls-lf select:focus, .nls-lf textarea:focus{
	outline:none; border-color:var(--lf-accent); box-shadow:0 0 0 3px rgba(196,0,46,.12); }
.nls-lf .has-error input, .nls-lf .has-error select, .nls-lf .has-error textarea{ border-color:var(--lf-accent-hi); }
.nls-lf__err{ font:500 12.5px/1.4 var(--lf-font); color:var(--lf-accent-hi); }

/* ── Choice chips (Category, Buyer/Seller) ────────────────────────────────── */
.nls-lf__chips{ display:flex; flex-wrap:wrap; gap:8px; }
.nls-lf__chip{ display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:8px 14px;
	border:1px solid var(--lf-line); border-radius:var(--lf-r-pill); background:var(--lf-surface);
	font:600 13px var(--lf-font); color:var(--lf-slate); cursor:pointer; }
.nls-lf__chip.is-active{ border-color:var(--lf-accent); background:var(--lf-wash); color:var(--lf-accent); }

/* ── Footer: always bottom-right, ghost Cancel + brand-red primary ────────── */
.nls-lf__foot{ display:flex; justify-content:flex-end; align-items:center; gap:10px;
	padding:18px 32px 24px; border-top:1px solid var(--lf-line-soft); }
.nls-lf__foot--split{ justify-content:space-between; }
.nls-lf__btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px;
	min-height:44px; padding:11px 20px; border-radius:var(--lf-r-pill); border:1px solid transparent;
	font:700 14px var(--lf-font); cursor:pointer; text-decoration:none; }
.nls-lf__btn--ghost{ background:var(--lf-surface); border-color:var(--lf-line); color:var(--lf-slate); }
.nls-lf__btn--ghost:hover{ border-color:#C7CCDC; }
.nls-lf__btn--primary{ background:var(--lf-accent); color:#fff; }
.nls-lf__btn--primary:hover{ background:var(--lf-accent-hi); }
.nls-lf__btn[disabled]{ opacity:.55; cursor:not-allowed; }

/* ── Modal shell (the three modal surfaces share it) ──────────────────────── */
.nls-lf--modal{ background:var(--lf-surface); border-radius:var(--lf-r-md);
	box-shadow:0 24px 60px rgba(20,22,40,.22); max-width:760px; width:100%;
	max-height:88vh; overflow:auto; }
.nls-lf__close{ position:absolute; top:22px; right:24px; width:40px; height:40px; display:inline-flex;
	align-items:center; justify-content:center; border:1px solid var(--lf-line); border-radius:12px;
	background:var(--lf-surface); color:var(--lf-slate); font-size:17px; line-height:1; cursor:pointer; }
.nls-lf__close:hover{ border-color:#C7CCDC; }

/* ── Inline panel variant (the Buyer details editor is not a modal) ───────── */
.nls-lf--panel{ background:var(--lf-surface); border:1px solid var(--lf-line-soft);
	border-radius:var(--lf-r-md); }
.nls-lf--panel .nls-lf__head{ padding:20px 22px 14px; }
.nls-lf--panel .nls-lf__section{ padding:18px 22px 4px; }
.nls-lf--panel .nls-lf__foot{ padding:16px 22px 20px; }
.nls-lf--panel .nls-lf__title{ font-size:22px; }

@media (prefers-reduced-motion:reduce){ .nls-lf *{ transition:none !important; } }

/* ── Additions 2026-09-23, asked for by the surfaces as they converted ────── */

/* A quiet inline action inside a section — "Search matching properties →",
   "Search existing NLS property →". Not a button: it navigates or opens a picker. */
.nls-lf__link{ align-self:flex-start; padding:0; border:0; background:none; cursor:pointer;
	font:700 13px var(--lf-font); color:var(--lf-accent); text-decoration:none; }
.nls-lf__link:hover{ text-decoration:underline; }

/* Form-level message, above the footer: the whole-form complaint that belongs to no
   single field ("Add an email address or mobile number."). Per-field errors stay in
   .nls-lf__err. Hidden until it has something to say. */
.nls-lf__banner{ margin:0 32px 4px; padding:11px 14px; border-radius:var(--lf-r-sm);
	font:600 13px/1.45 var(--lf-font); }
.nls-lf__banner:empty{ display:none; }
.nls-lf__banner--error{ background:var(--lf-wash); color:var(--lf-accent); box-shadow:inset 0 0 0 1px rgba(196,0,46,.22); }
.nls-lf__banner--ok{ background:#F1F8F3; color:#1B7F4B; box-shadow:inset 0 0 0 1px rgba(27,127,75,.20); }
.nls-lf--panel .nls-lf__banner{ margin-inline:22px; }
