/* ==========================================================================
   THE RACING BOARD, DRESSED LIKE THE NUMBER GAMES (Austin, 11 November 2026:
   "polish display races on retail cashier so they can have the same or similar
   theme and colour like the number games ... they are too basic").

   Spin 2 Win, Keno and Colour Colour read as one family: a navy band over every
   market, coloured stripes down the left of every pick, light-cyan price cards
   that press like keys, gold for the one thing that matters. The dog and horse
   board was a flat white table. This file gives it the same bones.

   RULES OF THIS FILE
   - Look only. Not one price, runner, race or market is drawn here: every number
     on the board still comes from the card book, verbatim.
   - Every selector starts with body[data-racing="true"], the attribute the
     cashier sets while a racing game is open, so football, Keno and the rest are
     untouched.
   - Colours come from the cashier's tokens (cashier-ui.css), so the dark theme
     (cashier-dark.css, :root[data-theme="dark"]) follows without a second
     palette. The few literals are the trap colours, which are the runner's
     colour on a race board and the same in both themes.
   - cashier-ui.css stays frozen; this rides on top of it and loads after it.
   ========================================================================== */

body[data-racing="true"]{
  /* the six trap colours — the same six a greyhound board paints, and the ones
     the horse board cycles through for twelve runners */
  --tc1:#C8362B; --tc2:#2150B8; --tc3:#F2F4F5; --tc4:#1B2430; --tc5:#E8772B; --tc6:#7B8794;
  /* horses 7-12: the SAME six the Forecast picker and the TV wall paint, so a cashier told "the green one, 7" finds a green 7 */
  --tc7:#0A7D43; --tc8:#F4C20D; --tc9:#7D3FBF; --tc10:#6FC3E8; --tc11:#8A5A2B; --tc12:#128B8B;
  --rc-gold:#F2C14E;
}

/* ---------- the group headers: a navy band, like a number game's market bar ---------- */
body[data-racing="true"] .grphead{
  background:linear-gradient(180deg,var(--deep-top) 0%,var(--deep-bot) 100%);
  border-bottom:2px solid var(--rc-gold)}
body[data-racing="true"] .grphead .g{
  color:var(--on-deep);font-size:.8rem;letter-spacing:.14em;padding:.42rem 2px}
body[data-racing="true"] .grphead .g .inf{background:var(--rc-gold);color:#102A36;font-weight:800}
/* the three groups tell apart by a thin light seam, not by a change of ground */
body[data-racing="true"] .grphead .g[data-gi="1"]{background:rgba(255,255,255,.06)}
body[data-racing="true"] .grphead .gsep{background:rgba(255,255,255,.18)}

/* ---------- the column heads ---------- */
body[data-racing="true"] .colhead{
  background:linear-gradient(180deg,var(--panel2) 0%,var(--panel) 100%);
  border-bottom:1px solid var(--line2)}
body[data-racing="true"] .colhead .c{color:var(--acc3);font-weight:800;letter-spacing:.06em;font-size:.8rem}
body[data-racing="true"] .colhead .fx{color:var(--ink2);letter-spacing:.16em}

/* ---------- the runner rows ---------- */
body[data-racing="true"] .frow{
  background:var(--panel);border-bottom:1px solid var(--line);
  transition:background .12s var(--ease),box-shadow .12s var(--ease)}
body[data-racing="true"] .frow:nth-child(even){background:var(--panel2)}
body[data-racing="true"] .frow:hover{background:var(--t-e4f5fa);box-shadow:inset 0 0 0 1px var(--acc2)}
/* every row wears its trap colour down the left edge */
/* by the row's POSITION, not data-trap: that marker cycles 1-6 for a twelve-horse card and painted horse 7 red (QA on #824) */
body[data-racing="true"] #frows > .frow:nth-child(1){--tc:var(--tc1)}
body[data-racing="true"] #frows > .frow:nth-child(2){--tc:var(--tc2)}
body[data-racing="true"] #frows > .frow:nth-child(3){--tc:var(--tc3)}
body[data-racing="true"] #frows > .frow:nth-child(4){--tc:var(--tc4)}
body[data-racing="true"] #frows > .frow:nth-child(5){--tc:var(--tc5)}
body[data-racing="true"] #frows > .frow:nth-child(6){--tc:var(--tc6)}
body[data-racing="true"] #frows > .frow:nth-child(7){--tc:var(--tc7)}
body[data-racing="true"] #frows > .frow:nth-child(8){--tc:var(--tc8)}
body[data-racing="true"] #frows > .frow:nth-child(9){--tc:var(--tc9)}
body[data-racing="true"] #frows > .frow:nth-child(10){--tc:var(--tc10)}
body[data-racing="true"] #frows > .frow:nth-child(11){--tc:var(--tc11)}
body[data-racing="true"] #frows > .frow:nth-child(12){--tc:var(--tc12)}
body[data-racing="true"] .frow .fx.rcfx{
  border-left:6px solid var(--tc,var(--line2));padding-left:.5rem;gap:.55rem}
/* white's stripe needs an edge or it vanishes on a white row */
body[data-racing="true"] #frows > .frow:nth-child(3) .fx.rcfx{border-left-color:var(--line2);box-shadow:inset 3px 0 0 var(--tc3)}
/* the favourite is the row the eye should find first */
body[data-racing="true"] .frow[data-fav]{
  background:linear-gradient(90deg,rgba(242,193,78,.24) 0%,rgba(242,193,78,.08) 38%,rgba(242,193,78,0) 70%),var(--panel)}
body[data-racing="true"] .frow[data-fav]:hover{background:linear-gradient(90deg,rgba(242,193,78,.34) 0%,rgba(242,193,78,.12) 40%,rgba(242,193,78,0) 70%),var(--t-e4f5fa)}

/* the card number sits quiet; the trap badge is the loud one */
body[data-racing="true"] .fx.rcfx .no{
  flex:0 0 1.5rem;height:auto;background:none;border:0;box-shadow:none;
  font-family:var(--mono);font-size:.7rem;font-weight:700;color:var(--ink3)}
/* the trap badge: a glossy tile in the runner's colour, as big as a ball on a number board */
body[data-racing="true"] .fx.rcfx .trap{
  flex:0 0 2.15rem;height:2.15rem;border-radius:var(--r2);font-size:1.15rem;font-weight:800;
  background:linear-gradient(180deg,rgba(255,255,255,.34) 0%,rgba(255,255,255,0) 52%),var(--tc,#7B8794);
  box-shadow:inset 0 -2px 3px rgba(0,0,0,.28),0 1px 3px rgba(11,42,53,.3);
  text-shadow:0 1px 1px rgba(0,0,0,.35)}
body[data-racing="true"] #frows > .frow:nth-child(3) .fx.rcfx .trap{color:#12202B;text-shadow:none;
  background:linear-gradient(180deg,#fff 0%,#DDE5E9 100%);box-shadow:inset 0 0 0 1px #B8C6CD,0 1px 3px rgba(11,42,53,.25)}
body[data-racing="true"] #frows > .frow:nth-child(4) .fx.rcfx .trap{box-shadow:inset 0 -2px 3px rgba(0,0,0,.5),inset 0 0 0 1px #3A4655,0 1px 3px rgba(11,42,53,.3)}
/* dark type on the two light colours, whatever class the row's badge carries */
body[data-racing="true"] #frows > .frow:nth-child(8) .fx.rcfx .trap,
body[data-racing="true"] #frows > .frow:nth-child(10) .fx.rcfx .trap{color:#12202B;text-shadow:none}
body[data-racing="true"] .fx.rcfx .rcname b{letter-spacing:.02em}
/* THE CHIP NEVER LOSES TO A LONG NAME (QA on #827): the name is a block that ends in an ellipsis before the chip's room,
   and the chip sits in that room, so a favourite called "Puzzled Slowcoach" shows its FAV and gives up the end of its name instead. */
body[data-racing="true"] .fx.rcfx .rcname b{display:block;position:relative;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* only the favourite's row reserves the chip's room; every other name keeps its full width, as before #824 */
body[data-racing="true"] .frow[data-fav] .fx.rcfx .rcname b{padding-right:2.4rem}
body[data-racing="true"] .fx.rcfx .rcname b .fav{position:absolute;right:0;top:50%;transform:translateY(-50%)}
/* FAV is a gold chip, not a word */
body[data-racing="true"] .fx.rcfx .rcname b .fav{
  font-family:var(--disp);font-size:.6rem;font-weight:800;letter-spacing:.12em;color:#4A3200;
  background:linear-gradient(180deg,#FBE29A 0%,var(--rc-gold) 100%);border-radius:1rem;padding:.08rem .3rem;box-shadow:0 1px 2px rgba(120,80,0,.25)}
/* the strength bar: a thicker, glossier track; the favourite's is gold */
body[data-racing="true"] .fx.rcfx .form .bar{
  height:.52rem;max-width:7rem;background:var(--ink700);box-shadow:inset 0 1px 2px rgba(11,42,53,.22)}
body[data-racing="true"] .fx.rcfx .form .bar span{
  background:linear-gradient(180deg,rgba(255,255,255,.4) 0%,rgba(255,255,255,0) 60%),linear-gradient(90deg,var(--acc3),#2E9BBE)}
body[data-racing="true"] .frow[data-fav] .fx.rcfx .form .bar span{
  background:linear-gradient(180deg,rgba(255,255,255,.45) 0%,rgba(255,255,255,0) 60%),linear-gradient(90deg,#D9A521,var(--rc-gold))}
body[data-racing="true"] .fx.rcfx .form i{color:var(--ink3);font-weight:600}
body[data-racing="true"] .fx.rcfx .form u{font-family:var(--mono);font-size:.74rem;color:var(--ink2)}
body[data-racing="true"] #frows[data-many="true"] .fx.rcfx .trap{flex:0 0 1.75rem;height:1.75rem;font-size:.95rem}

/* ---------- the price cards: the number games' cyan keys, with a gold ring when picked ---------- */
body[data-racing="true"] .ocell .pillodd:not(:disabled),
body[data-racing="true"] .rcgrid .pillodd:not(:disabled),
body[data-racing="true"] .rclong .pillodd:not(:disabled){border:1px solid var(--acc2)}
body[data-racing="true"] .ocell .pillodd[data-sel="true"],
body[data-racing="true"] .rcgrid .pillodd[data-sel="true"],
body[data-racing="true"] .rclong .pillodd[data-sel="true"]{
  border-color:var(--rc-gold);
  box-shadow:0 0 0 2px var(--rc-gold),0 3px 8px rgba(11,42,53,.35);
  transform:translateY(-1px)}
/* the favourite's winning price is the one to look at */
body[data-racing="true"] .frow[data-fav] .ocell:first-of-type .pillodd:not([data-sel="true"]):not(:disabled){
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85),inset 0 -2px 3px rgba(10,110,140,.18),0 0 0 2px rgba(242,193,78,.85),0 1px 3px rgba(11,42,53,.22)}
/* a closed price says so quietly */
body[data-racing="true"] .ocell .pillodd:disabled{opacity:.55}

/* ---------- the flat market panels under the runners ---------- */
body[data-racing="true"] .rcpanel{background:var(--panel);border-top:0}
body[data-racing="true"] .rcph{
  position:relative;padding:.38rem .9rem .38rem 1.15rem;
  background:linear-gradient(180deg,var(--deep-top) 0%,var(--deep-bot) 100%)}
body[data-racing="true"] .rcph::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:.32rem;background:var(--rc-gold)}
body[data-racing="true"] .rcph b{color:var(--on-deep);letter-spacing:.14em}
body[data-racing="true"] .rcph i{color:var(--on-deep);opacity:.72}
body[data-racing="true"] .rccell .l{color:var(--acc3);font-weight:800;letter-spacing:.12em}
body[data-racing="true"] .rcprow{border-top:2px solid var(--line2)}

/* ---------- the combination picker (Forecast, Quinella, Tricast ...): one card per position ---------- */
body[data-racing="true"] .rcpick{gap:.6rem;padding:.8rem 1rem;align-content:start}
body[data-racing="true"] .rcprow2{
  gap:.9rem;padding:.55rem .8rem;border:1px solid var(--line);border-left:6px solid var(--acc3);
  border-radius:var(--r2);background:linear-gradient(180deg,var(--panel) 0%,var(--panel2) 100%);box-shadow:var(--e1)}
body[data-racing="true"] .rcplab{
  flex:0 0 3.4rem;color:var(--acc3);font-size:.82rem;letter-spacing:.16em}
body[data-racing="true"] .rcpchip{
  width:2.7rem;height:2.7rem;border-radius:var(--r2);border:1px solid rgba(0,0,0,.18);opacity:1;
  background-image:linear-gradient(180deg,rgba(255,255,255,.32) 0%,rgba(255,255,255,0) 52%);
  box-shadow:inset 0 -2px 3px rgba(0,0,0,.26),0 1px 3px rgba(11,42,53,.28);
  text-shadow:0 1px 1px rgba(0,0,0,.3);transition:transform .1s var(--ease),box-shadow .1s var(--ease)}
body[data-racing="true"] .rcpchip.t3,body[data-racing="true"] .rcpchip.t8,body[data-racing="true"] .rcpchip.t10{text-shadow:none}
body[data-racing="true"] .rcpchip:hover:not(:disabled){transform:translateY(-1px)}
body[data-racing="true"] .rcpchip[data-on="true"]{
  border-color:var(--rc-gold);transform:translateY(-2px);
  box-shadow:0 0 0 3px var(--rc-gold),0 4px 9px rgba(11,42,53,.38)}
body[data-racing="true"] .rcpchip:disabled{opacity:.25}
body[data-racing="true"] .rcpbar{
  padding:.65rem .8rem;margin-top:.1rem;border:1px solid var(--line);border-top:1px solid var(--line);
  border-radius:var(--r2);background:var(--panel2)}
/* the price it pays: a navy window with the number in gold, like a number game's payout readout */
body[data-racing="true"] .rcpval{
  min-width:6.5rem;padding:.3rem .8rem;border-radius:var(--r2);text-align:center;
  background:linear-gradient(180deg,var(--deep-top) 0%,var(--deep-bot) 100%);color:var(--rc-gold);
  box-shadow:inset 0 1px 3px rgba(0,0,0,.5);letter-spacing:.02em}

/* ---------- THE 11px FLOOR, HERE TOO (15 November 2026) ----------
   The cashier's rule since slice 4 is that no text is under 11px (a badge beside a figure may be 10px), and tools/terminal/screen_type_floor.py checks
   it. This sheet came later and set five things in rem alone, which at a 1366-wide counter is 9.4px for the card number, 9.9px for the form figure,
   10.7px for the two headings and 8px for FAV; the check had been failing on master for both racing games. Same sizes on a big screen, a floor on a small one. */
body[data-racing="true"] .grphead .g,
body[data-racing="true"] .colhead .c{font-size:max(var(--floor,11px),.8rem)}
body[data-racing="true"] .fx.rcfx .no{font-size:max(11px,.7rem)}
body[data-racing="true"] .fx.rcfx .form u{font-size:max(11px,.74rem)}
body[data-racing="true"] .fx.rcfx .rcname b .fav{font-size:max(10px,.6rem)}
/* the chip is about 31px wide at 10px, so the favourite's name keeps 36px clear of it (2.4rem is under 32px on a counter 1366 wide or less, and the
   last letter of the name touched the chip) */
body[data-racing="true"] .frow[data-fav] .fx.rcfx .rcname b{padding-right:max(2.4rem,36px)}

/* ---------- DARK ---------- */
:root[data-theme="dark"] body[data-racing="true"]{--rc-gold:#F0B83A}
:root[data-theme="dark"] body[data-racing="true"] .frow{background:var(--panel)}
:root[data-theme="dark"] body[data-racing="true"] .frow:nth-child(even){background:var(--panel2)}
:root[data-theme="dark"] body[data-racing="true"] .frow:hover{background:var(--surf3)}
:root[data-theme="dark"] body[data-racing="true"] .frow[data-fav]{
  background:linear-gradient(90deg,rgba(240,184,58,.22) 0%,rgba(240,184,58,.07) 38%,rgba(240,184,58,0) 70%),var(--panel)}
:root[data-theme="dark"] body[data-racing="true"] .frow[data-fav]:hover{
  background:linear-gradient(90deg,rgba(240,184,58,.3) 0%,rgba(240,184,58,.1) 40%,rgba(240,184,58,0) 70%),var(--surf3)}
:root[data-theme="dark"] body[data-racing="true"] #frows > .frow:nth-child(3) .fx.rcfx{border-left-color:#3A4B56}
:root[data-theme="dark"] body[data-racing="true"] .fx.rcfx .form .bar span{
  background:linear-gradient(180deg,rgba(255,255,255,.25) 0%,rgba(255,255,255,0) 60%),linear-gradient(90deg,#2E9BBE,var(--acc3))}
:root[data-theme="dark"] body[data-racing="true"] .colhead{background:var(--panel2)}
:root[data-theme="dark"] body[data-racing="true"] .colhead .c{color:var(--acc3)}
:root[data-theme="dark"] body[data-racing="true"] .frow[data-fav] .ocell:first-of-type .pillodd:not([data-sel="true"]):not(:disabled){
  box-shadow:0 0 0 2px rgba(240,184,58,.8),0 1px 3px rgba(0,0,0,.4)}
:root[data-theme="dark"] body[data-racing="true"] .ocell .pillodd[data-sel="true"],
:root[data-theme="dark"] body[data-racing="true"] .rcgrid .pillodd[data-sel="true"],
:root[data-theme="dark"] body[data-racing="true"] .rclong .pillodd[data-sel="true"]{
  box-shadow:0 0 0 2px var(--rc-gold),0 3px 8px rgba(0,0,0,.5)}
