/* Vilni Local — components of the /local-check design system (T6a, owner-approved concept T5b, 01.11.2026).
   Markup: core/admin/templates/saas/_lc_ui.html.j2 (macros) + _lc_icons.html.j2 (SVG sprite). Colours only from
   tokens.css. Rules: a status colour always comes with its icon and word; «Ви» = brand, «Лідер» = grey; one solid
   primary button per screen; radii 999 / 12 / 16 / 20; nesting at most two levels. */

/* ── icons ── */
.lc-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.lc-i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* ── chips / status: icon + word ── */
.lc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: var(--lc-r-chip); font: 700 13px/1.5 var(--lc-font); white-space: nowrap; align-self: start; }
.lc-chip .lc-i { width: 15px; height: 15px; stroke-width: 2.2; }
.lc-chip.good { background: var(--lc-good-soft); color: var(--lc-good-ink); }
.lc-chip.mid { background: var(--lc-mid-soft); color: var(--lc-mid-ink); }
.lc-chip.bad { background: var(--lc-bad-soft); color: var(--lc-bad-ink); }
.lc-chip.n { background: var(--lc-surface-2); color: var(--lc-ink-2); padding-left: 10px; }
.lc-chip.b { background: var(--lc-primary-soft); color: var(--lc-chip-b-ink); padding-left: 10px; }

/* ── gauge: semicircle, three faint zones, value arc in its zone colour ── */
.lc-gauge { position: relative; width: 200px; flex: none; display: flex; flex-direction: column; align-items: center; }
.lc-gauge > svg { display: block; width: 100%; height: auto; overflow: visible; }
.lc-gz { fill: none; stroke-width: 14; stroke-opacity: .2; }
.lc-gz.bad { stroke: var(--lc-bad); } .lc-gz.mid { stroke: var(--lc-mid); } .lc-gz.good { stroke: var(--lc-good); }
.lc-garc { fill: none; stroke-width: 14; stroke-linecap: round; stroke-dasharray: var(--v) 100; animation: lc-garc 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes lc-garc { from { stroke-dasharray: 0 100; } }
.lc-gauge.bad .lc-garc { stroke: var(--lc-bad); } .lc-gauge.mid .lc-garc { stroke: var(--lc-mid); } .lc-gauge.good .lc-garc { stroke: var(--lc-good); }
.lc-gknob { fill: var(--lc-card); stroke: var(--lc-ink); stroke-width: 3; }
.lc-gauge-v { margin-top: -46px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.lc-gauge-v b { font: 700 46px/1 var(--lc-font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--lc-ink); }
.lc-gauge-of { font-size: 12px; font-weight: 700; color: var(--lc-mut); margin-bottom: 2px; }
.lc-sub-w { color: var(--lc-mut); font-weight: 700; font-size: 13px; }

/* ── metric tile: label, the number in ink, the zone as a chip ── */
.lc a.lc-tile { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px 16px; border-radius: var(--lc-r-tile); background: var(--lc-surface-2); border: 1px solid transparent; color: var(--lc-ink); text-decoration: none; transition: border-color .15s; }
.lc a.lc-tile:hover { border-color: var(--lc-primary); }
.lc-tile-l { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 700; color: var(--lc-mut); }
.lc-tile-l .lc-i { width: 16px; height: 16px; }
.lc-tile b { font: 800 24px/1.15 var(--lc-font); font-variant-numeric: tabular-nums; }
.lc-tile b small { font: 700 14px var(--lc-font); color: var(--lc-mut); }
.lc-tile .lc-chip { margin-top: auto; }

/* ── «Ви / Лідер» bars ── */
.lc-cmp-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.lc-cmp-h p { margin: 0; font: 800 14px var(--lc-font); }
.lc-cb { display: grid; grid-template-columns: minmax(44px, max-content) minmax(0, 1fr) minmax(36px, auto); gap: 10px; align-items: center; font-size: 13px; font-weight: 700; color: var(--lc-ink-2); }
.lc-cb + .lc-cb { margin-top: 6px; }
.lc-cb-tr { position: relative; height: 12px; border-radius: 4px; background: var(--lc-card); }
.lc-cb-tr i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; min-width: 4px; max-width: 100%; }
.lc-cb.you i { background: var(--lc-you); } .lc-cb.lead i { background: var(--lc-lead); }
.lc-cb b { text-align: right; color: var(--lc-ink); font-variant-numeric: tabular-nums; font-size: 15px; }

/* ── checklist status mark: icon in a tinted circle (the word is .lc-sr next to it) ── */
.lc-st, .r-st { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none; vertical-align: -7px; margin-right: 6px; background: var(--lc-surface-2); color: var(--lc-mut); }
.r-st { width: 28px; height: 28px; margin: 0; }
.lc-st .lc-i, .r-st .lc-i { width: 15px; height: 15px; stroke-width: 2.4; }
.lc-st.ok, .r-st.ok { background: var(--lc-good-soft); color: var(--lc-good-ink); }
.lc-st.partial, .r-st.partial { background: var(--lc-mid-soft); color: var(--lc-mid-ink); }
.lc-st.missing, .r-st.missing { background: var(--lc-bad-soft); color: var(--lc-bad-ink); }

/* ── buttons: primary (.lc-cta / .lc-btn, lc.css) · secondary · text ── */
.lc .r-buy.r-ghost, .lc .r-second, .lc .lc-b-s, .lc .lc-cand-none { background: var(--lc-card); color: var(--lc-ink) !important; border: 1.5px solid var(--lc-line-strong); box-shadow: none; }
.lc .r-buy.r-ghost:hover, .lc .r-second:hover, .lc .lc-b-s:hover, .lc .lc-cand-none:hover { background: var(--lc-card); border-color: var(--lc-primary); color: var(--lc-primary) !important; }
.lc .r-second { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--lc-r-ctl); font: 700 15px var(--lc-font); text-decoration: none; cursor: pointer; }
.lc .lc-cand-none { border-radius: var(--lc-r-ctl); }
.lc-link { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.lc-cta[disabled], .lc-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

/* ── fields: one look for every text input of the funnel ── */
.lc-inp, .lc-ufields input[type=tel], .lc-ufields input[type=email], .r-dlg-f input[type=text], .r-dlg-f input[type=tel], .r-dlg-f input[type=email],
.lc-order-f input, .lc-lock input[type=text], .lc-lock input[type=tel], .lc-tform textarea, .lc-tform input[type=text], .lc-draft, .lc-urlbox {
  box-sizing: border-box; min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--lc-field-line); border-radius: var(--lc-r-ctl);
  background: var(--lc-field-bg); color: var(--lc-ink); font: 600 16px var(--lc-font); min-width: 0; transition: border-color .15s, box-shadow .15s; }
.lc-inp::placeholder, .lc-ufields input::placeholder, .r-dlg-f input::placeholder, .lc-tform textarea::placeholder, .lc-tform input::placeholder { color: var(--lc-ph); font-weight: 500; }
.lc-inp:hover, .lc-ufields input:hover, .r-dlg-f input:hover, .lc-order-f input:hover, .lc-tform textarea:hover, .lc-tform input[type=text]:hover { border-color: var(--lc-mut); }
.lc-inp:focus-visible, .lc-ufields input:focus-visible, .r-dlg-f input:focus-visible, .lc-order-f input:focus-visible, .lc-lock input:focus-visible, .lc-tform textarea:focus-visible, .lc-tform input[type=text]:focus-visible {
  outline: none; border-color: var(--lc-primary); box-shadow: 0 0 0 4px var(--lc-primary-ring); }
.lc-inp[aria-invalid="true"], .lc-ufields input[aria-invalid="true"], .r-dlg-f input[aria-invalid="true"], .lc-lock input[aria-invalid="true"] { border-color: var(--lc-bad); background: var(--lc-bad-soft); }
@media (forced-colors: active) { .lc-inp:focus-visible, .lc-ufields input:focus-visible, .r-dlg-f input:focus-visible, .lc-order-f input:focus-visible, .lc-lock input:focus-visible, .lc-tform textarea:focus-visible, .lc-tform input[type=text]:focus-visible { outline: 2px solid Highlight; } }

/* ── tariff cards (/local-pricing .lc-tier, result Н10 .r-tier) ── */
.lc-tier, .r-tier { display: flex; flex-direction: column; gap: 4px; padding: 24px; border: 1.5px solid var(--lc-line); border-radius: var(--lc-r-card); background: var(--lc-card); min-width: 0; }
.lc-tier.feat, .r-tier.main { border-color: var(--lc-primary); box-shadow: 0 0 0 4px var(--lc-primary-ring); }
.lc-tier ul, .r-tier ul { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 8px; font-size: 15px; color: var(--lc-ink-2); }
.lc-tier li, .r-tier li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; }
.lc-tier li .lc-i, .r-tier li .lc-i { width: 18px; height: 18px; margin-top: 2px; color: var(--lc-primary); stroke-width: 2.2; }

/* ── table → cards on a phone (rows carry data-label) ── */
@media (max-width: 480px) {
  .lc-tbl-cards, .lc-tbl-cards tbody, .lc-tbl-cards tr, .lc-tbl-cards td { display: block; width: 100%; }
  .lc-tbl-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .lc-tbl-cards tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--lc-line); border-radius: var(--lc-r-tile); }
  .lc-tw .lc-tbl-cards td { border: 0; padding: 0; white-space: normal; }
  .lc-tbl-cards td:first-child { grid-column: 1 / -1; font-weight: 800; }
  .lc-tbl-cards td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 800; color: var(--lc-mut); }
  .lc-tw:has(.lc-tbl-cards) { overflow: visible; }
}

/* ── states: loading · empty · error · success ── */
.lc-skel { display: grid; gap: 10px; }
.lc-sk, .lc-mapbox:empty { border-radius: 10px; background: linear-gradient(90deg, var(--lc-surface-2), var(--lc-line), var(--lc-surface-2)); background-size: 200% 100%; animation: lc-sk 1.4s linear 8; }  /* bounded: the map mounts in ~1 s, no endless repaint without JS */
.lc-sk { display: block; height: 14px; } .lc-sk:nth-child(3n) { width: 70%; }
.lc-mapbox:empty { border-radius: var(--lc-r-card); }
@keyframes lc-sk { to { background-position: -200% 0; } }
.lc-empty { text-align: center; padding: 28px 16px; }
.lc-empty-ic { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px; background: var(--lc-primary-soft); color: var(--lc-primary); }
.lc-empty h2, .lc-empty h3 { font-size: 18px; margin: 0 0 4px; }
.lc-empty p { margin: 0; color: var(--lc-ink-2); }
.lc-alert { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.lc-alert .lc-i { width: 22px; height: 22px; color: var(--lc-bad-ink); }
.lc-ok { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; background: var(--lc-good-soft); color: var(--lc-good-ink); font-weight: 700; }
.lc-ok .lc-i { stroke-width: 2.4; }

/* every error box gets the alert icon, also those rendered without ui.alert() (pay / tools forms): a mask, no markup */
.lc-error:not(.lc-alert) { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.lc-error:not(.lc-alert)::before { content: ""; width: 22px; height: 22px; background: currentColor; -webkit-mask: url("/static/local/i-alert.svg") center / contain no-repeat; mask: url("/static/local/i-alert.svg") center / contain no-repeat; }

/* full-card states (failed / missing check): a tinted icon over the heading */
.lc-state-ic { display: block; width: 44px; height: 44px; padding: 10px; margin-bottom: 12px; border-radius: 12px; background: var(--lc-primary-soft); color: var(--lc-primary); box-sizing: border-box; }
.lc-state.bad .lc-state-ic { background: var(--lc-bad-soft); color: var(--lc-bad-ink); }
.lc-map-attr { margin-top: 8px; }
.lc-i-s { width: 15px; height: 15px; vertical-align: -2px; }
/* «Ви» / «Лідер» label with its colour swatch (preview cards) */
.lc-who { display: inline-flex; align-items: center; gap: 6px; }
.lc-who::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--lc-lead); }
.lc-who.you::before { background: var(--lc-you); }

/* K4: staff-only line statuses of a tariff (review mode); never rendered for a client */
.lc-staff-lines { margin: 10px 0 0; padding: 8px 10px; list-style: none; border: 1px dashed var(--lc-line-strong); border-radius: var(--lc-r-ctl); font-size: 12px; color: var(--lc-ink-2); }
.lc-tier .lc-staff-lines { display: grid; gap: 6px; margin: 10px 0 0; font-size: 12px; }
.lc-tier .lc-staff-lines li { display: block; }
.lc-staff-lines b { display: inline-block; margin-right: 4px; padding: 0 6px; white-space: nowrap; border-radius: var(--lc-r-chip); background: var(--lc-good-soft); color: var(--lc-good-ink); font-weight: 600; }
.lc-staff-lines [data-status="manual"] b, .lc-staff-lines [data-status="switch"] b { background: var(--lc-mid-soft); color: var(--lc-mid-ink); }
.lc-staff-lines [data-status="hidden"] b { background: var(--lc-bad-soft); color: var(--lc-bad-ink); }

@media (prefers-reduced-motion: reduce) {
  .lc-garc { animation: none; }
  .lc-sk, .lc-mapbox:empty { animation: none; }
  .lc a.lc-tile { transition: none; }
}
@media (forced-colors: active) {
  .lc-chip, .lc-st, .r-st { border: 1px solid CanvasText; }
  .lc-garc { stroke: Highlight; } .lc-cb.you i { background: Highlight; } .lc-cb.lead i { background: GrayText; }
}
.lc-state-p { margin: 0 0 4px; color: var(--lc-ink-2); max-width: 62ch; }

/* ── map legend swatches (ui.hexsw): same looks as the hexagons of map-kit.js / map-live.js ── */
.lc-sw { width: 18px; height: 16px; flex: none; }
.lc-sw.top3 polygon { fill: var(--lc-band-top3); } .lc-sw.mid polygon { fill: var(--lc-band-mid); } .lc-sw.low polygon { fill: var(--lc-band-low); }
.lc-sw.water polygon { fill: var(--lc-band-water); }
.lc-sw.none polygon { fill: url(#lc-sw-hatch); }
.lc-sw-h0 { fill: var(--lc-band-none-soft); } .lc-sw-h1 { fill: var(--lc-band-none); }
.lc-sw.failed polygon { fill: var(--lc-map-ground); stroke: var(--lc-band-failed); stroke-width: 1.4; stroke-dasharray: 2 1.6; }
.lc-sw.home polygon { fill: none; stroke: var(--lc-band-you-halo); stroke-width: 4; stroke-linejoin: round; }
.lc-sw.home polygon + polygon { stroke: var(--lc-band-you-line); stroke-width: 2; }

/* Pricing page, funnel SCRIPT v6: «Мережа» has no number — its line reads as text, not as a price */
.lc-tier-price.lc-tier-ask { font: 700 20px/1.3 var(--lc-font); letter-spacing: 0; }
/* «Що таке Vilni Local SEO» on the pricing page: heading, benefit, then the detail — no list markers */
.lc-doing-list { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 14px; }
.lc-doing-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; }
.lc-doing-list li .lc-i { width: 18px; height: 18px; margin-top: 3px; color: var(--lc-primary); }
.lc-doing-list li > span { display: grid; gap: 4px; min-width: 0; }
.lc-doing-what { font-weight: 600; color: var(--lc-ink); }
