/* ==========================================================================
   THE CASHIER'S DARK THEME.
   Everything here is under :root[data-theme="dark"], set by cashier-theme.js, so
   with that attribute absent (the default) this file changes NOTHING and the
   counter is exactly what cashier-ui.css draws. Light stays the default.

   Only TOKENS are restated first (the names cashier-ui.css already uses), then
   the few controls whose light look was written as a literal colour. A shop wall
   (?tv=) never gets the attribute, so walls are untouched.

   Dark is deep slate, not black: a pure-black counter glares in a dim shop and
   the pale-on-dark text halos. The cyan accent is kept, lifted so it reads on the
   dark ground; PLACE stays the one strong colour on the screen.
   ========================================================================== */
:root[data-theme="dark"]{
  color-scheme: dark;
  --veil:rgba(18,28,35,.76);
  --ok:#5FD39A; --ok-bg:#12281E; --ok-line:#245C40;
  --bg:#0C1419; --panel:#121C23; --panel2:#17232B; --surf3:#1D2C36;
  --ink900:#101A21; --ink850:#142029; --ink800:#18262F; --ink750:#101A21; --ink700:#203340; --ink600:#2A4251;
  --line:#243742; --line2:#34505F;
  --ink:#E7F1F5; --ink2:#AFC4CE; --ink3:#93AAB6;
  --acc:#17607A; --acc2:#1F7692; --acc3:#7FD6EC; --accbright:#7FD6EC;
  --accdim:rgba(127,214,236,.16); --accglow:rgba(127,214,236,.35);
  --onacc:#F2FBFE;
  --gold:#F0B83A; --gold2:#F0C45E; --brand:var(--acc);
  --pill:#17607A; --pillhi:#1F7692; --pill2:#134F66;
  --pillsel:#F4F8FA; --pillsel2:#DCE7EC;
  --green:#7FD6EC; --green2:#5DC3DC; --red:#F0625F; --red2:#E04A47; --warn:#F0B83A; --warn-ink:#F0B83A;
  --pick-ink:#1A0505;   /* the figure on a picked (red) price in dark: white on this red reads at about 3:1, this at 5:1 and better */
  --key:#1F2D36; --key2:#192630; --keyhi:#2A3B46;
  --e1:0 1px 2px rgba(0,0,0,.4);
  --e2:0 2px 8px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.35);
  --e3:0 22px 60px rgba(0,0,0,.6), 0 4px 14px rgba(0,0,0,.4);
  --edge:inset 0 1px 0 rgba(255,255,255,.06);
  --plate:#16232B; --key-top:#243642; --key-bot:#1A2931; --key-bot-hi:#2D4553;
}

/* ---- the pale tints, each lightness-flipped (same hue, softer saturation) so every gradient keeps both ends dark. Generated once from the light values. */
:root[data-theme="dark"]{
  --t-c6e8f3:#1F4652;
  --t-c7d6dd:#324852;
  --t-cdedf6:#1D414B;
  --t-d6e0e5:#2B3C44;
  --t-d6f4fb:#193B42;
  --t-dff4fa:#17353D;
  --t-dff5fb:#17343C;
  --t-e1ecf1:#1D333E;
  --t-e1eef3:#19353F;
  --t-e4f2f7:#17323C;
  --t-e4f5fa:#16323A;
  --t-e7eef1:#1F2F36;
  --t-e7eff3:#1C2E38;
  --t-e8f3f7:#163039;
  --t-e9f0f4:#1B2C36;
  --t-e9f6fa:#152F37;
  --t-e9fafe:#142E34;
  --t-eaf3f7:#152D38;
  --t-eaf4f8:#152D37;
  --t-eaf6fa:#142E36;
  --t-ecf0f1:#222C2E;
  --t-edf1f3:#1F2A2F;
  --t-edf4f7:#172B34;
  --t-eff7fa:#132A33;
  --t-f2c8e6:#511F43;
  --t-f2f7fa:#132531;
  --t-f4fafc:#11272E;
  --t-f4fcfe:#11272D;
  --t-f6dcda:#431C19;
  --t-f8f7f3:#2B2719;
  --t-fbf3de:#3D3317;
  --t-fee2e2:#391515;
  --t-fff0ef:#2F1412;
  --t-fff2f1:#2E1411;
  --t-fff5f5:#2C1010;
  --t-fff7e4:#372D15;
}

/* ---- controls whose light look was written as a literal colour --------------- */
:root[data-theme="dark"] .clockx .seg{background:linear-gradient(180deg,#263A46 0%,#1A2931 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 1px 2px rgba(0,0,0,.5)}
:root[data-theme="dark"] .clockx .seg.s{background:linear-gradient(180deg,var(--sel-b-top,#1F4A59) 0%,var(--sel-b-bot,#16394A) 100%);border-color:var(--acc2)}
:root[data-theme="dark"] .lgb[aria-pressed="true"]{background:linear-gradient(180deg,var(--sel-top,#245B6E) 0%,var(--sel-bot,#1B4A5B) 100%);
  border-color:var(--acc3);color:var(--sel-ink,#E9FAFF);box-shadow:var(--edge),0 0 0 1px rgba(127,214,236,.25)}
:root[data-theme="dark"] .wk[aria-pressed="true"]{background:linear-gradient(180deg,var(--sel-top,#245B6E) 0%,var(--sel-bot,#1B4A5B) 100%);color:var(--sel-ink,#E9FAFF);
  border-color:var(--acc3);box-shadow:inset 0 -2.5px 0 var(--acc3),0 1px 4px rgba(0,0,0,.4)}
:root[data-theme="dark"] .frow .fx{background:linear-gradient(90deg,rgba(255,255,255,.05) 0%,rgba(255,255,255,0) 100%)}
:root[data-theme="dark"] #cempty{background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(127,214,236,.05))}
:root[data-theme="dark"] .upsw .kn{background:#3A5260}
:root[data-theme="dark"] .pillodd:disabled{background:linear-gradient(180deg,#1E2B33,#18242B);color:#5E7581}
:root[data-theme="dark"] .bonusline,
:root[data-theme="dark"] .tk.paid .bar,
:root[data-theme="dark"] .badge.paid{background:#3A2F12;color:#F2C969;border-color:#5A4818}
:root[data-theme="dark"] .delx:hover{background:linear-gradient(180deg,#4A2224,#3A1A1C)}
:root[data-theme="dark"] .pv .amtlab .clr:hover{background:#3A1A1C}
:root[data-theme="dark"] .kn-qp button:hover{background:#1D3A46}
:root[data-theme="dark"] .k8-noslip{background:#352C12;border-color:#5A4818;color:#F2C969}
:root[data-theme="dark"] .prstat[data-pr="bad"]{background:linear-gradient(180deg,#43201F,#381A1A);color:#FF9A98;border-color:#C0403C}

/* ---- things that are PAPER or a fixed light chip stay light in dark mode. They were
   built on --plate and the pale tints, so those tokens are restated back to their light
   values inside each one (and nowhere else). */
:root[data-theme="dark"] .receipt,
:root[data-theme="dark"] .rsg.big em,
:root[data-theme="dark"] .rcpchip.t3,
:root[data-theme="dark"] .fx.rcfx .trap.t3{
  --plate:#FFFFFF; --t-f8f7f3:#F8F7F3; --t-ecf0f1:#ECF0F1}
/* top-bar figures were written as the light ink */
:root[data-theme="dark"] .bal b{color:var(--ink)}
:root[data-theme="dark"] .prstat[data-pr="ok"],
:root[data-theme="dark"] .prpic[data-pr="ok"] .prword,
:root[data-theme="dark"] .tk .ok{color:#6EDB9C}
:root[data-theme="dark"] .prpic[data-pr="bad"] .prword{color:#FF9A98}

/* ---- Keno 40 and Keno 80 keep their own token names; restate them here.
   The four/eight zone colours (red, blue, green, yellow ...) are the GAME's colours and
   stay as they are. */
:root[data-theme="dark"]{
  --kn-navy:#0B1A24; --kn-navy2:#12293A;
  --kn-line:#2A3E4A; --kn-line2:#3A5564; --kn-panel2:#16232B;
  --kn-ink:#E3EEF3; --kn-mute:#A3B8C3; --kn-dim:#7C93A0;
  --kn-accent:var(--acc3,#7FD6EC); --kn-accent2:var(--sel-hi,#2A88A2);
  --kn-pill-b:var(--sel-pill,#2A6E84); --kn-pill-h:var(--sel-pillhi,#2D8BA6); --kn-pill-off:#1C2A33;
  --kn-gold:#E0A82E; --kn-tabon:var(--sel-b-top,#1F4A59);
  --k8-navy:#0B1A24;
  --k8-line:#2A3E4A; --k8-line2:#3A5564; --k8-panel2:#16232B;
  --k8-ink:#E3EEF3; --k8-mute:#A3B8C3; --k8-dim:#7C93A0;
  --k8-accent:var(--acc3,#7FD6EC);
  --k8-pill-b:var(--sel-pill,#2A6E84); --k8-pill-h:var(--sel-pillhi,#2D8BA6); --k8-pill-off:#1C2A33;
}
:root[data-theme="dark"] .kn-num,
:root[data-theme="dark"] .k8-num{background:linear-gradient(180deg,#27475A,#1B3340);border-color:#3A5F73;color:#E3EEF3}
:root[data-theme="dark"] .kn-num:hover,
:root[data-theme="dark"] .k8-num:hover{background:linear-gradient(180deg,#31596E,#23424F)}
:root[data-theme="dark"] .kn-num[aria-pressed="true"],
:root[data-theme="dark"] .k8-num[aria-pressed="true"]{background:linear-gradient(180deg,var(--sel-hi,#2A88A2),var(--sel-lo,#1F6F86));border-color:var(--acc3,#7FD6EC);color:#fff}
:root[data-theme="dark"] .kn-num:disabled,
:root[data-theme="dark"] .k8-num:disabled{background:#1A2830;color:#5E7581}
/* THE COLOUR EDGE STAYS IN DARK (15 November 2026). The two rules above set border-color on all four sides, which wiped the 5px zone colour down the left of every
   Keno 80 number, while the legend under the board (Red, Green, Blue ...) still promised it. Light never lost it: its pressed rule restates the left edge the same way. */
:root[data-theme="dark"] .k8-num:not(:disabled){border-left-color:var(--k8-zc)}

/* ---- slice 3 ------------------------------------------------------------------ */
/* THE CHOSEN ODDS must be the loudest thing on the board. In dark it is RED, as in light (Austin, 16 November 2026: "red in dark too"), with dark figures because white on
   this red is too faint, and a bright ring so it still outshouts every unpicked price. Football and the races only: the number games and Colour Colour keep their own
   selected looks (they paint colours that mean something). */
:root[data-theme="dark"] body:not([data-keno="true"]):not([data-keno80="true"]):not([data-cc="true"]):not([data-lb="true"]):not([data-jr="true"]):not([data-s2w="true"]) .pillodd[data-sel="true"]:not([data-cccol]){
  background:linear-gradient(180deg,var(--red) 0%,var(--red2) 100%);color:var(--pick-ink);border-color:#FFFFFF;
  box-shadow:0 0 0 3px var(--red),0 0 14px rgba(240,98,95,.55)}
/* Raptor's "money sitting on seats" warning is amber ON PURPOSE, but a pale card is a glare
   in a dim shop: the same warning, in a dark amber. Raptor's own stylesheet is not edited. */
:root[data-theme="dark"] .rap-hold{background:#3A2F12}
:root[data-theme="dark"] .rap-hold .s{color:#F2C969}
:root[data-theme="dark"] .rap-hold .k{color:#F2C969}
:root[data-theme="dark"] .rap-hold .v{color:#FFE2A0}
/* the small label under a price (Hi / Lo / 2 colours / a range): the light theme draws it dark on
   a pale pill; on the dark pill it must be pale, and white on the coloured Colour Colour pills. */
:root[data-theme="dark"] .pillodd:not([data-sel="true"]) small{color:rgba(255,255,255,.88)}
