/*
 * admin-leads-standard.css
 * -----------------------------------------------------------------------------
 * Admin-designstandard v1 — additive Leads-fane-atomer, ekstrahert ut av
 * index.html for å holde varmfilen netto-negativ (governance: krymp index.html).
 * Lastes SIST i <head> (etter inline <style>) slik at disse additive
 * overstyringene vinner cascade. Modifiserte eksisterende regler blir værende
 * inline; her ligger kun rene tillegg (::before-prikker, nye selektorer,
 * mobil-overstyringer). Referanse: docs/_active/kontrakter/admin-designstandard-v1.md
 */

/* §Atomene: tekst-filterrad — boksfri klikkbar tekst, aktiv = brand-understrek. */
.admin-leads-choicerow { display:flex; gap:18px; flex-wrap:wrap; align-items:center; }
.admin-leads-choicerow-label { font-size:12px; font-weight:700; color:var(--graa); letter-spacing:.01em; }
.admin-leads-choice { border:none; background:transparent; padding:2px 0; font-size:13px; font-weight:600; color:var(--graa); cursor:pointer; position:relative; line-height:1.3; transition:color .15s ease; }
.admin-leads-choice:hover { color:var(--skog); }
.admin-leads-choice.is-active { color:var(--skog); }
.admin-leads-choice.is-active::after { content:""; position:absolute; left:0; right:0; bottom:-5px; height:2px; background:var(--mose); border-radius:2px; }
.admin-leads-choice:focus-visible { outline:2px solid var(--mose); outline-offset:3px; border-radius:3px; }

/* §1: tabell = haarstrek-rader, ingen skygge/ramme rundt flaten. */
.admin-leads-table-wrap.tabell { box-shadow:none; border-radius:0; background:transparent; overflow:visible; overflow-x:auto; }

/* §v1.1.1: ingen bokser rundt kategorinavn — tjeneste = ikon + farget ren tekst. */
.admin-leads-table-wrap .badge-tjeneste,
.admin-lead-card .badge-tjeneste { padding:0; background:transparent; border-radius:0; font-size:12px; font-weight:600; }

/* §1/§80: mobil-kort boksfri OGSÅ innvendig — piller (behov/fagtype/alder) -> ren tekst. */
.admin-lead-card-list > .admin-lead-card:first-child { border-top:none; }
.admin-lead-card .badge { padding:0; background:transparent; border-radius:0; font-size:12px; font-weight:600; }
.admin-lead-card .admin-lead-age-chip { padding:0; background:transparent; border-radius:0; font-weight:600; }

/* §1/§80: filterkort/visningskort/oppsummering/avansert hviler paa flaten (ingen skygge). */
.admin-leads-views-card.kort,
.admin-leads-v1-filter-card.kort,
#admin-leads-craft-summary.kort,
#admin-leads-extra-controls-card.kort { box-shadow:none; background:transparent; border:none; border-radius:0; }
.admin-leads-v1-filter-card.kort { border-bottom:1px solid var(--lys); padding-left:0; padding-right:0; }

/* §v1.1.4: moderne soek-atom — underline, ingen boks, brand-strek paa fokus. */
#leads-sok { flex:1; min-width:140px; max-width:320px; border:none; border-bottom:1.5px solid var(--lys); border-radius:0; background:transparent; box-shadow:none; padding:6px 2px; transition:border-color .18s ease; }
#leads-sok:focus { outline:none; border-bottom-color:var(--mose); }
#leads-sok::placeholder { color:var(--graa); }

/* §3/§v1.1.5: status = farge-prikk (prikken baerer status, teksten full lesekontrast). */
.admin-leads-v1-status::before { content:""; width:8px; height:8px; border-radius:50%; flex:0 0 auto; background:var(--graa); }
.admin-leads-v1-status.is-kritisk::before { background:var(--kritisk); }
.admin-leads-v1-status.is-varsel::before { background:var(--varsel); }
.admin-leads-v1-status.is-domene::before { background:var(--lime); }
.admin-leads-v1-status.is-rolig::before { background:var(--mose); }
.admin-leads-v1-status.is-ny::before { background:#5ea9ff; }
.admin-leads-v1-status.is-kontaktet::before { background:var(--mose); }
.admin-leads-v1-status.is-konvertert::before { background:var(--mose); }
.admin-leads-v1-status.is-avvist::before { background:#8a7f6b; }

/* Mobil (<=480px): full bredde, stablet, ingen overflyt; romsligere kort. */
@media (max-width: 480px) {
  .admin-leads-v1-filter-card .adm-toolbar { flex-direction:column; align-items:stretch; gap:12px; }
  #leads-sok { max-width:none; width:100%; }
  .admin-leads-v1-filter-card .adm-toolbar > .btn { width:100%; }
  .admin-leads-choicerow { gap:10px 16px; }
  .admin-leads-v1-meta { flex-direction:column; align-items:stretch; gap:10px; }
  #leads-pagination { display:flex; align-items:center; justify-content:space-between; width:100%; }
  .admin-leads-views-card.kort { padding-top:4px; }
  #admin-leads-status-intro { margin-bottom:6px; }
  .admin-leads-v1-filter-card.kort { padding-bottom:12px; }

  /* --- Verdensklasse mobil-rad (Apple HIG + Linear/Attio): progressiv avsløring,
     disclosure-chevron, romslig trykkeflate, klart hierarki, trunkering. --- */
  .admin-lead-card-list { gap:0; }
  .admin-lead-card {
    position:relative;
    padding:14px 26px 14px 2px;   /* plass til chevron til hoyre */
    gap:4px;
    min-height:44px;              /* HIG-trykkeflate */
    align-content:center;
    transition:background .12s ease;
    -webkit-tap-highlight-color:transparent;
  }
  .admin-lead-card:active { background:#f1f5ec; }
  /* Disclosure-chevron = "trykk for detaljer" (erstatter repetert tekst). */
  .admin-lead-card::after {
    content:""; position:absolute; right:5px; top:50%;
    width:7px; height:7px;
    border-right:2px solid var(--graa); border-bottom:2px solid var(--graa);
    transform:translateY(-60%) rotate(-45deg); opacity:.5;
    pointer-events:none;
  }
  /* Navn + tid: baseline, navn kraftig og trunkert, tid tabular og dempet. */
  .admin-lead-card-head { align-items:baseline; gap:10px; }
  .admin-lead-card-head > div:first-child { min-width:0; flex:1; }
  .admin-lead-card-title { font-size:16px; font-weight:650; letter-spacing:-.01em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .admin-lead-card-head .admin-lead-cell-stack { align-items:flex-end; flex:0 0 auto; }
  .admin-lead-card-head .admin-lead-cell-stack > div:first-child { font-size:12px; color:var(--graa); font-variant-numeric:tabular-nums; }
  /* Sekundaerlinje (sted) og statuslinje. */
  .admin-lead-card-head .admin-lead-card-score { font-size:12.5px; color:var(--graa); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .admin-lead-card-summary { gap:5px 12px; margin-top:1px; }
  .admin-lead-card-summary .admin-leads-v1-status { font-weight:650; color:var(--skog); }
  /* Fotnote-detalj: dempet, én linje, trunkert. */
  .admin-lead-card > .admin-lead-card-score { font-size:12px; color:var(--graa); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
}

@media (prefers-reduced-motion: reduce) { .admin-leads-choice, .admin-lead-card { transition:none; } }
