/* CROWD — theme.css (NEW FILE, web-v2). Website theme: Auto (light 06:00–18:00 Doha time, dark otherwise) · Light · Dark.
   The choice is kept in localStorage 'crowd:theme' and applied as <html data-theme="light|dark"> before the page paints
   (a tiny script in <head>; web-account.js keeps it up to date and draws the switches). style.css already holds both
   palettes as CSS variables (:root / :root[data-theme="dark"]); this file only adds what dark mode was missing so it looks
   intentional on every page: shop cards, product sheets, the bag + checkout, My account. Text contrast is ≥ 4.5:1 in both
   themes (checked by changes/web-v2/tests/browser-e2e.mjs). Light mode is unchanged. */
:root[data-theme="dark"]{
  color-scheme:dark;
  --muted:#aaa69e;            /* a touch lighter than style.css #a29e96: ≥ 4.5:1 on --mist and on the card shadows */
  --line:rgba(243,242,238,.16);
  --plate:#f6f5f1;           /* product photos are cut out for a light plate: keep them on a soft paper plate */
  --shadow:0 0 0 1px rgba(243,242,238,.06),0 18px 40px -24px rgba(0,0,0,.8);
  --raised:#1d1d1b;          /* sheets, dialogs, cards lifted above the page */
}
:root[data-theme="dark"] body{background:var(--paper);color:var(--ink)}
/* dialogs (product quick view, bag + checkout, sign-in sheet, coffee details) sit one step above the page */
:root[data-theme="dark"] dialog.qv,:root[data-theme="dark"] dialog.drawer,:root[data-theme="dark"] dialog.nerd{background:var(--raised);color:var(--ink)}
:root[data-theme="dark"] dialog::backdrop{background:rgba(0,0,0,.66)}
:root[data-theme="dark"] .drawer .dh,:root[data-theme="dark"] .drawer .df{background:var(--raised)}
:root[data-theme="dark"] .fld input,:root[data-theme="dark"] .fld textarea,:root[data-theme="dark"] .fld select,
:root[data-theme="dark"] .phone span,:root[data-theme="dark"] .sp-rep textarea{background:#262624;border-color:rgba(243,242,238,.2)}
:root[data-theme="dark"] .fld input:focus,:root[data-theme="dark"] .fld textarea:focus,:root[data-theme="dark"] .fld select:focus{background:#0c0c0b;border-color:var(--ink)}
:root[data-theme="dark"] .fld input::placeholder,:root[data-theme="dark"] .fld textarea::placeholder{color:#8f8b83}
:root[data-theme="dark"] .fld input.wl-locked{color:var(--muted)}
/* cards on the account page and the checkout boxes */
:root[data-theme="dark"] .wa-card{background:var(--raised)}
:root[data-theme="dark"] .co-how,:root[data-theme="dark"] .wl-co,:root[data-theme="dark"] .sp-msg{background:#262624}
:root[data-theme="dark"] .gv,:root[data-theme="dark"] .sp-msg.st{background:var(--paper)}
/* error box: readable red tint on dark */
:root[data-theme="dark"] .wl-err{background:rgba(255,107,95,.12);border-color:rgba(255,107,95,.45);color:#ffd9d4}
:root[data-theme="dark"] .fld input:user-invalid{border-color:#ff8a80}
/* kraft labels keep their dark ink (kraft stays light in both themes) */
:root[data-theme="dark"] .wl-test,:root[data-theme="dark"] .wa-st.st-ready,:root[data-theme="dark"] .wa-st.sp-answered{color:#1b150b}
/* buttons */
:root[data-theme="dark"] .btn.ghost{border-color:rgba(243,242,238,.28)}
:root[data-theme="dark"] .btn.wa{color:#5cc985!important;border-color:#5cc985!important}   /* style.css does this only for the system dark mode */
:root[data-theme="dark"] .icon-btn{border-color:rgba(243,242,238,.2)}
/* header blur over dark content */
:root[data-theme="dark"] header.top{background:color-mix(in srgb,var(--paper) 90%,transparent)}
/* light mode explicitly chosen while the phone/computer is in dark mode: keep the light palette (style.css does) and
   say so to the browser so form controls and scrollbars are light too */
:root[data-theme="light"]{color-scheme:light}
/* footer: Privacy · Terms (web-v2) — the right language without app.js keys */
html[lang="ar"] .l-en,html:not([lang="ar"]) .l-ar{display:none}
.foot-legal a{color:#c9c5bd;text-decoration:underline;text-underline-offset:3px}
.foot-legal a:hover{color:#fff}
