/*
 * ISTL Motivated Leads — location page + lead card styles.
 * Brand: red #D90000 (CTA), navy #242A38 (exclusive pill), green #1D9E75 (verified/A),
 * fonts Poppins (headings) + Inter (body) — already loaded by the theme.
 * Matches the approved simplified card.
 */

.istl-ml-page { max-width: 1080px; margin: 0 auto; padding: 24px 16px 56px; font-family: Inter, system-ui, sans-serif; color: #242A38; }

.istl-ml-breadcrumb { font-size: 12px; color: #5B6573; margin-bottom: 10px; }
.istl-ml-breadcrumb a { color: #5B6573; text-decoration: none; }
.istl-ml-breadcrumb a:hover { color: #242A38; }
.istl-ml-breadcrumb .sep { margin: 0 6px; }
.istl-ml-breadcrumb .current { color: #242A38; font-weight: 500; }

.istl-ml-h1 { font-family: Poppins, sans-serif; font-size: 28px; font-weight: 600; margin: 4px 0 10px; line-height: 1.2; }
.istl-ml-h2 { font-family: Poppins, sans-serif; font-size: 20px; font-weight: 600; margin: 28px 0 12px; }
.istl-ml-sub { font-size: 14px; color: #5F5E5A; margin: -6px 0 14px; }
.istl-ml-intro { font-size: 16px; line-height: 1.6; color: #5F5E5A; max-width: 760px; margin-bottom: 20px; }
.istl-ml-intro--authored { margin-top: -8px; }
.istl-ml-intro strong { color: #242A38; }

/* stat strip */
.istl-ml-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 26px; }
.istl-ml-stats > div { background: #F5F6F8; border-radius: 10px; padding: 14px 16px; }
.istl-ml-stats span { display: block; font-family: Poppins, sans-serif; font-size: 22px; font-weight: 600; }
.istl-ml-stats small { font-size: 12px; color: #5B6573; }
.istl-ml-stats--accent span { color: #D90000; }

/* one-line live-feed freshness cue (replaces the old 3-up proof grid) */
/* block (not flex) so the inline <time> runs keep natural word spacing — a flex
 * container would split the sentence into separate items and trim/gappify the
 * whitespace around each <time> ("today , newest posted today ."). */
.istl-ml-freshline { display: block; margin: -8px 0 22px; font-size: 13px; line-height: 1.5; color: #5B6573; }
.istl-ml-freshline time { color: #242A38; font-weight: 500; }
.istl-ml-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; vertical-align: middle; border-radius: 50%; background: #1D9E75; box-shadow: 0 0 0 3px rgba(29,158,117,.18); }

/* feed heading with inline live-count badge */
.istl-ml-feedhead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.istl-ml-feedhead span { font-family: Inter, system-ui, sans-serif; font-size: 12px; font-weight: 600; color: #0F6E56; background: #E1F5EE; padding: 3px 9px; border-radius: 999px; }

/* card grid */
.istl-ml-grid { display: flex; flex-direction: column; gap: 14px; }

.istl-ml-card { background: #fff; border: 1px solid #E2E5EA; border-radius: 14px; padding: 18px 20px; }
.istl-ml-card__top { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.istl-ml-card__top .istl-ml-grade { margin-left: auto; }

.istl-ml-pill { display: inline-block; white-space: nowrap; font-size: 11px; font-weight: 600; letter-spacing: .4px; padding: 5px 11px; border-radius: 8px; }
.istl-ml-pill--exclusive { background: #1c2230; color: #fff; }
.istl-ml-pill--available { background: #E1F5EE; color: #0F6E56; }
.istl-ml-pill--hold { background: #FAEEDA; color: #854F0B; }
.istl-ml-pill--raw { background: #EEF1F5; color: #5F5E5A; }
.istl-ml-pill--early { background: #FAEEDA; color: #854F0B; }
.istl-ml-pill--soldout { background: #FCEBEB; color: #A32D2D; }

.istl-ml-grade { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.istl-ml-grade__badge { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 6px; background: var(--g, #1D9E75); color: #fff; font-size: 13px; font-weight: 600; border-radius: 8px; }
.istl-ml-grade__label { font-size: 11px; color: #5B6573; line-height: 1.1; }

.istl-ml-card__body { display: flex; flex-wrap: wrap; gap: 18px; }
.istl-ml-card__info { flex: 1; min-width: 260px; }
.istl-ml-card__loc { font-family: Poppins, sans-serif; font-size: 18px; font-weight: 600; margin: 0; }
.istl-ml-card__sub { font-size: 13px; color: #5B6573; margin: 2px 0 8px; }
.istl-ml-card__verified { font-size: 12px; color: #0F6E56; margin: 0 0 12px; }

.istl-ml-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.istl-ml-fact dt { font-size: 11px; color: #5B6573; margin: 0; }
.istl-ml-fact dd { font-size: 13px; font-weight: 500; color: #242A38; margin: 1px 0 0; }
.istl-ml-card__teaser { margin: 12px 0 0; max-width: 620px; font-size: 13px; line-height: 1.5; color: #5F5E5A; }
.istl-ml-card__teaser span { display: block; margin-bottom: 2px; font-size: 11px; color: #5B6573; }

.istl-ml-card__rail { width: 180px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.istl-ml-card__note { font-size: 11px; color: #5B6573; text-align: center; margin-top: 2px; }

.istl-ml-btn { display: inline-block; background: #D90000; color: #fff; border: none; font-size: 14px; font-weight: 600; padding: 11px 16px; border-radius: 8px; text-align: center; text-decoration: none; cursor: pointer; margin-top: 8px; transition: background .15s; }
.istl-ml-btn:hover { background: #B80000; color: #fff; }
.istl-ml-btn--ghost { background: transparent; color: #242A38; border: 1px solid #C9CED6; font-size: 12px; padding: 8px 12px; margin: 0; }
.istl-ml-btn--ghost:hover { background: #F5F6F8; color: #242A38; }

.istl-ml-card__buyers { display: flex; gap: 22px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #EDEFF2; font-size: 12px; color: #5F5E5A; }
.istl-ml-card__buyers strong { color: #242A38; }

/* sold card — compact VERTICAL card so it survives the narrow soldgrid columns
 * (was a horizontal space-between flex whose nowrap right rail overflowed and
 * overlapped the location text once packed 3-4 across). */
.istl-ml-soldgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.istl-ml-sold { background: #F5F6F8; border: 1px solid #E2E5EA; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.istl-ml-sold__main { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.istl-ml-sold__loc { font-size: 14px; font-weight: 600; }
.istl-ml-sold__loc span { font-weight: 400; font-size: 12px; color: #5B6573; }
.istl-ml-sold__meta { font-size: 12px; color: #5F5E5A; margin-top: 2px; }
.istl-ml-sold__right { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 2px; }
.istl-ml-sold__right .istl-ml-grade__badge { flex: 0 0 auto; }
.istl-ml-sold__right .istl-ml-btn { flex: 1 1 auto; text-align: center; white-space: nowrap; }

/* alerts band */
.istl-ml-alerts { background: #242A38; border-radius: 14px; padding: 18px 20px; margin: 20px 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.istl-ml-alerts strong { display: block; color: #fff; font-size: 15px; }
.istl-ml-alerts span { color: #A9B2C0; font-size: 13px; }

.istl-ml-article-cta { max-width: 760px; margin: 30px 0; padding: 18px 20px; border: 1px solid #E2E5EA; border-left: 4px solid #D90000; border-radius: 8px; background: #FBFCFD; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: Inter, system-ui, sans-serif; }
.istl-ml-article-cta strong { display: block; color: #242A38; font-size: 16px; line-height: 1.35; }
.istl-ml-article-cta span { display: block; max-width: 560px; margin-top: 4px; color: #5F5E5A; font-size: 13px; line-height: 1.5; }
.istl-ml-article-cta .istl-ml-btn { margin-top: 0; }

/* nav link lists (state/county) */
.istl-ml-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 24px; }
.istl-ml-links a { color: #185FA5; text-decoration: none; font-size: 14px; }
.istl-ml-links a:hover { text-decoration: underline; }

.istl-ml-market-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.istl-ml-market-list a { display: flex; min-height: 64px; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid #E2E5EA; border-radius: 8px; color: #242A38; text-decoration: none; background: #fff; transition: border-color .15s, box-shadow .15s; }
.istl-ml-market-list a:hover { border-color: #D90000; box-shadow: 0 4px 14px rgba(36, 42, 56, .08); }
.istl-ml-market-list__txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.istl-ml-market-list strong { font-size: 14px; }
.istl-ml-market-list__txt span { color: #5B6573; font-size: 12px; }
.istl-ml-market-list__arrow { flex: 0 0 auto; color: #C9CED6; font-size: 18px; line-height: 1; transition: transform .15s, color .15s; }
.istl-ml-market-list a:hover .istl-ml-market-list__arrow { color: #D90000; transform: translateX(3px); }
.istl-ml-market-list a:focus-visible { outline: 2px solid #185FA5; outline-offset: 2px; }

/* hub: three clear ways to browse, placed right under the header */
.istl-ml-browse-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 0 0 28px; }
.istl-ml-browse-nav a { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid #E2E5EA; border-radius: 10px; background: #fff; color: #242A38; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.istl-ml-browse-nav a:hover { border-color: #D90000; box-shadow: 0 4px 14px rgba(36, 42, 56, .08); }
.istl-ml-browse-nav strong { font-size: 14px; }
.istl-ml-browse-nav span { font-size: 12px; color: #5B6573; }
.istl-ml-browse-nav a:focus-visible { outline: 2px solid #185FA5; outline-offset: 2px; }

.istl-ml-pager { margin: 18px 0; display: flex; gap: 8px; }
.istl-ml-pager .page-numbers { padding: 6px 11px; border: 1px solid #E2E5EA; border-radius: 8px; text-decoration: none; color: #242A38; font-size: 13px; }
.istl-ml-pager .current { background: #242A38; color: #fff; border-color: #242A38; }

.istl-ml-empty { color: #5B6573; font-size: 14px; }
.istl-ml-notes, .istl-ml-faq, .istl-ml-agent { margin-top: 28px; font-size: 15px; line-height: 1.6; color: #5F5E5A; }
/* condensed "how it works" strip (replaces the old proof + method + intent + buyer-questions grids) */
.istl-ml-how { margin-top: 28px; }
.istl-ml-how__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.istl-ml-how__grid > div { border-left: 3px solid #D90000; padding: 10px 14px; background: #FBFCFD; }
.istl-ml-how__grid strong { display: block; margin-bottom: 4px; font-size: 13px; color: #242A38; }
.istl-ml-how__grid p { margin: 0; font-size: 13px; line-height: 1.5; color: #5F5E5A; }
.istl-ml-faq details { border-bottom: 1px solid #EDEFF2; padding: 12px 0; }
.istl-ml-faq summary { font-weight: 500; color: #242A38; cursor: pointer; }
/* primary conversion band — stronger than the alerts band; sits right after the feed */
.istl-ml-alerts--primary { box-shadow: 0 8px 28px rgba(36,42,56,.16); }
.istl-ml-alerts--primary strong { font-size: 16px; }
.istl-ml-alerts--primary .istl-ml-btn { font-size: 15px; padding: 13px 22px; }

/* about-this-market authored copy */
.istl-ml-notes__lead { font-size: 16px; line-height: 1.6; color: #3E4452; margin-bottom: 12px; }
.istl-ml-notes__aud { margin-top: 12px; }

.istl-ml-mobile-cta { display: none; }

@media (max-width: 640px) {
	.istl-ml-page { padding-bottom: 104px; }
	.istl-ml-card__rail { width: 100%; }
	.istl-ml-facts { grid-template-columns: 1fr; }
	.istl-ml-mobile-cta { position: fixed; z-index: 50; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #E2E5EA; border-radius: 10px; background: #fff; box-shadow: 0 10px 32px rgba(36, 42, 56, .18); }
	.istl-ml-mobile-cta span { min-width: 0; color: #242A38; font-size: 12px; font-weight: 600; line-height: 1.25; }
	.istl-ml-mobile-cta .istl-ml-btn { flex: 0 0 auto; margin: 0; padding: 9px 12px; font-size: 12px; }
	.istl-ml-article-cta { margin: 24px 0; }
	.istl-ml-article-cta .istl-ml-btn { width: 100%; }
}

/* ──────────────────────────────────────────────────────────────────────────
 * Theme integration (i-speed-to-lead)
 * The theme's #masthead/.site-header is position:fixed (~74px tall) but the
 * header-clearing padding is scoped to body.body-4 only — a class that
 * location (CPT) pages never receive — so page content slid up under the
 * fixed header (breadcrumb + H1 hidden, intro clipped). The template wrapper
 * also carries the theme's `.page-container` class (max-width:1150px;
 * padding:0 20px) which overrides the plugin's own padding and zeroes the top.
 * Re-assert vertical spacing with selectors specific enough to win the cascade
 * (#masthead + main… and main.istl-ml-page.page-container beat .page-container).
 * ────────────────────────────────────────────────────────────────────────── */
#masthead + main.istl-ml-page { padding-top: 98px; }
main.istl-ml-page.page-container { padding-bottom: 56px; }

@media (max-width: 640px) {
	#masthead + main.istl-ml-page { padding-top: 90px; }
	/* leave room for the sticky CTA AND the site's floating Chaty call button */
	main.istl-ml-page.page-container { padding-bottom: 168px; }
	/* lift the sticky CTA above the floating call button so they don't collide */
	.istl-ml-mobile-cta { bottom: 84px; }
}

/* ──────────────────────────────────────────────────────────────────────────
 * Accessibility + polish
 * - Keyboard focus: the theme exposes no visible focus ring, so add our own
 *   for every interactive element (WCAG 2.4.7).
 * - Secondary grays were darkened to #5B6573 for WCAG AA contrast (was the
 *   #828D9E / #96A4BA pair at ~2.5-3.4:1 on light backgrounds).
 * - Market-notes paragraphs need spacing (the theme resets p{margin:0}).
 * ────────────────────────────────────────────────────────────────────────── */
.istl-ml-btn:focus-visible { outline: 3px solid #242A38; outline-offset: 2px; }
.istl-ml-breadcrumb a:focus-visible,
.istl-ml-links a:focus-visible,
.istl-ml-card__loc a:focus-visible { outline: 2px solid #185FA5; outline-offset: 2px; border-radius: 3px; }
.istl-ml-faq summary:focus-visible { outline: 2px solid #242A38; outline-offset: 2px; }

.istl-ml-notes p { margin-bottom: 12px; }
.istl-ml-notes p:last-child { margin-bottom: 0; }
.istl-ml-guides { margin-top: 28px; }

/* offset in-page jumps so the fixed header doesn't cover the target heading */
#istl-leads, #browse-states, #browse-cities, #browse-counties { scroll-margin-top: 100px; }

/* NOTE: the hub (archive-location.php) was migrated to the leaner v0.4 layout in
 * v0.4.1 — it now reuses .istl-ml-how / .istl-ml-alerts--primary / .istl-ml-notes
 * like the tier pages, so the old hub-only grids (.istl-ml-proof, .istl-ml-method,
 * .istl-ml-intent, .istl-ml-buyer-questions, .istl-ml-unlock) were removed. */
