/* prog.css — the progressive's sign, circle and panel, shared by every Play
   table and the progressive page. Linked after each game's own stylesheet; it
   reads that page's palette (--gold, --mono, --line…) with fallbacks so the
   progressive page can use it on its own.

   Two rules carried over from the tables themselves:
   - NO HEIGHT. The tables print their rules on the felt and size the felt and
     the dock to fit a phone screen together, so the progressive takes no line
     of either: the sign sits on the felt's top rail, half over the edge, in
     padding that is already there, and the circle is one more ring in a row
     that shrinks rather than wraps. The pay table opens OVER the felt.
   - FIXED GEOMETRY. Tabular digits, single lines, and nothing that changes
     size with a meter, so a jackpot ticking from $9,999.90 to $10,000.00 never
     moves the circle a thumb is about to hit. */

.pg-sign, .pg-spot, .pg-panel {
  --pg-amber: #ffb627; --pg-amber-glow: rgba(255,182,39,.45);
  /* data colours, validated as a pair on the dark panel (dataviz palette steps:
     blue 400, yellow) — the gold and amber of the sign are chrome, not data */
  --pg-f: #3987e5; --pg-j: #c98500;
}

/* ---- the sign, on the felt's top rail ----
   Centred on the felt's top edge, so half of it is in the panel's padding and
   half in the felt's. Above the phone dock (z-index 30) and the lobby overlay,
   so the pay table it opens is never under either. */
.pg-sign {
  position: absolute; z-index: 36; top: -12px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono, ui-monospace, monospace);
}
.pg-signb {
  display: flex; align-items: stretch; height: 24px; padding: 0; margin: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(180deg, #0b0d12, #151a22); border: 1px solid rgba(240,196,25,.55);
  box-shadow: 0 2px 10px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
  color: var(--ink, #e8edf2); font: inherit; white-space: nowrap;
}
.pg-signb:hover, .pg-signb:focus-visible { border-color: var(--gold, #f0c419); }
.pg-sc { position: relative; display: flex; align-items: center; gap: 6px; padding: 0 11px; }
.pg-sl { font-size: .54rem; letter-spacing: .8px; text-transform: uppercase; color: #a9b4c1; }
.pg-sv { font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--pg-amber); text-shadow: 0 0 8px var(--pg-amber-glow); }
.pg-sign.pg-plus .pg-signb { border-color: rgba(54,208,122,.85); box-shadow: 0 0 14px rgba(54,208,122,.35), 0 2px 10px rgba(0,0,0,.5); }
.pg-sign[data-mode="local"] .pg-signb { border-color: rgba(74,168,255,.6); }
.pg-sign.pg-dropped .pg-sv, .pg-panel.pg-dropped .pg-bigv { animation: pgDrop .9s ease; }
@keyframes pgDrop { 0% { color: #fff; text-shadow: 0 0 18px #fff; } 100% { } }

.pg-cap { font-size: .56rem; letter-spacing: .6px; text-transform: uppercase; color: #9aa7b6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }

/* ---- the circle: one more ring in the felt's row ----
   Smaller than the betting circles, like the sensor a real table has, so
   Heads Up's five circles and this one still fit a 390px phone. It inherits
   the ring, the stack and the won / lost / push results from the table's own
   stylesheet; what is here is its light. */
.pl-spots .pl-spot.pg-spot { flex-basis: calc(var(--ring, 62px) * .78); cursor: pointer; outline: none; }
.pg-spot .pl-spotpile { width: calc(var(--ring, 62px) * .78); border-color: rgba(255,182,39,.38); }
.pg-spot .pl-spotlbl { color: rgba(255,214,140,.85); }
.pg-spot .pl-spotamt { font-size: .62rem; }
@media (hover: hover) { .pg-spot:hover .pl-spotpile { border-color: var(--pg-amber); } }
.pg-spot:focus-visible .pl-spotpile { border-color: var(--pg-amber); box-shadow: 0 0 0 2px rgba(255,182,39,.45); }
/* on: the light is lit */
.pg-spot.pg-lit .pl-spotpile { border-style: solid; border-color: var(--pg-amber); box-shadow: 0 0 12px var(--pg-amber-glow), inset 0 0 10px rgba(255,182,39,.16); }
.pg-spot.pg-lit .pl-spotlbl { color: var(--pg-amber); }
.pg-spot.pg-lit .pl-spotamt { color: #ffd98a; }
.pg-spot.pg-local.pg-lit .pl-spotpile { border-color: #4aa8ff; box-shadow: 0 0 12px rgba(74,168,255,.45); }
/* off, but worth playing at today's meters */
.pg-spot.pg-plus .pl-spotpile { border-style: solid; border-color: var(--green, #36d07a); box-shadow: 0 0 14px rgba(54,208,122,.45); }
/* a meter hit */
.pg-spot.pg-jack .pl-spotpile { border-style: solid; border-color: #ffd34d; box-shadow: 0 0 18px rgba(255,211,77,.8), inset 0 0 12px rgba(255,211,77,.3); }
.pg-spot.pg-jack .pl-spotlbl, .pg-spot.pg-jack .pl-spotamt { color: #ffd34d; }
.pg-spot.pg-nudge { animation: pgNudge .35s ease; }
@keyframes pgNudge { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* ---- the pay table, over the felt ---- */
.pg-pop {
  position: absolute; z-index: 1; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 140px); overflow: auto; overscroll-behavior: contain;
  padding: 12px 14px; border-radius: 14px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: .82rem;
  /* opaque: over a phone's dock, whose glass is composited separately, even 3%
     of see-through lets the prompt under it read through the pay table */
  background: #0e1117; border: 1px solid rgba(240,196,25,.4); box-shadow: 0 18px 50px rgba(0,0,0,.6);
  color: var(--ink, #e8edf2); white-space: normal; text-align: left;
}
.pg-pophead { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--gold, #f0c419); }
.pg-pophead b { color: var(--gold, #f0c419); }
.pg-x { margin-left: auto; background: none; border: 1px solid var(--line, #2a323d); color: var(--muted, #93a1b0); border-radius: 8px; width: 28px; height: 28px; font-size: 1rem; line-height: 1; }
.pg-pay { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: .78rem; font-variant-numeric: tabular-nums; }
.pg-pay td { padding: 3px 4px; border-bottom: 1px solid rgba(255,255,255,.06); }
.pg-pay td.r { text-align: right; white-space: nowrap; font-family: var(--mono, monospace); }
.pg-pay tr.pm td:first-child { color: var(--gold, #f0c419); }
.pg-pay tr.pm td:nth-child(2) { color: #ffe27a; }
.pg-evbar { position: relative; display: flex; height: 12px; margin: 10px 0 4px; border-radius: 4px; background: rgba(255,255,255,.06); overflow: visible; }
.pg-evbar span { display: block; height: 100%; }
.pg-evbar .f { background: #3987e5; border-radius: 4px 0 0 4px; }
.pg-evbar .j { background: #c98500; }
/* the 2px gap between touching segments is the panel showing through, not a stroke */
.pg-evbar span + span { margin-left: 2px; }
.pg-evbar .even { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: #e8edf2; }
.pg-evkey { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .68rem; color: var(--muted, #93a1b0); font-family: var(--mono, monospace); }
.pg-evkey i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.pg-evkey i.f { background: #3987e5; } .pg-evkey i.j { background: #c98500; }
.pg-popnums { margin-top: 8px; display: grid; gap: 3px; font-size: .78rem; }
.pg-more { display: inline-block; margin-top: 8px; color: var(--accent, #4aa8ff); font-size: .78rem; text-decoration: none; }
.pg-more:hover { text-decoration: underline; }

/* ---- the side panel ---- */
.pg-panel .pl-hudhead .pg-more { margin-top: 0; }
.pg-big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.pg-bigm { min-width: 0; padding: 8px 10px; border-radius: 10px; background: #0d1016; border: 1px solid rgba(240,196,25,.2); }
.pg-bigm .pg-cap { font-family: var(--mono, monospace); }
.pg-bigv { font-family: var(--mono, monospace); font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; color: #ffb627; text-shadow: 0 0 10px rgba(255,182,39,.4); white-space: nowrap; overflow: hidden; }
.pg-sub { font-size: .66rem; color: var(--muted, #93a1b0); margin-top: 3px; line-height: 1.3; min-height: 2.6em; }
/* the break-even is a line to compare the meter with, not a meter: plain ink */
.pg-be .pg-bigv { color: var(--ink, #e8edf2); text-shadow: none; }
.pg-evline { margin-top: 10px; font-size: .8rem; }
.pg-h3 { margin: 12px 0 4px; font-size: .8rem; color: var(--gold, #f0c419); font-weight: 650; }
.pg-hits { display: grid; gap: 2px; min-height: 3em; }
.pg-hit { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; align-items: baseline; font-size: .74rem; padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.pg-hit .w { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-hit .a { color: #ffe27a; font-weight: 700; }
.pg-hit .t { font-size: .66rem; }
.pg-hit.you { background: rgba(240,196,25,.07); }
.pg-hit.you .t { color: var(--gold, #f0c419); }
.pg-mine { font-size: .76rem; min-height: 2.6em; }
.pg-modeln { margin-top: 10px; }

/* ---- the result's foot line and the moment ---- */
.pg-gold { color: #ffd34d; text-shadow: 0 0 10px rgba(240,196,25,.55); }
.pl-winfloat.pg-jackfloat { color: #ffd34d; text-shadow: 0 2px 22px rgba(240,196,25,.85); text-align: center; line-height: 1.05; font-size: 1.9rem; }
.pl-felt.pg-flash-jack { animation: pgFlashJack 1.6s ease; }
@keyframes pgFlashJack {
  0% { box-shadow: inset 0 0 0 0 rgba(240,196,25,0); }
  20% { box-shadow: inset 0 0 0 4px rgba(255,211,77,.95), inset 0 0 80px rgba(240,196,25,.55); }
  100% { box-shadow: inset 0 0 0 0 rgba(240,196,25,0); }
}

@media (max-width: 640px) {
  /* the phone panel pads 10px above the felt: a 20px sign fits it exactly */
  .pg-sign { top: -10px; }
  .pg-signb { height: 20px; }
  .pg-sc { padding: 0 9px; gap: 5px; }
  .pg-sl { font-size: .5rem; letter-spacing: .5px; }
  .pg-sv { font-size: .72rem; }
  .pg-spot .pl-spotamt { font-size: .58rem; }
  .pg-big { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-spot.pg-nudge, .pl-felt.pg-flash-jack, .pg-sign.pg-dropped .pg-sv, .pg-panel.pg-dropped .pg-bigv { animation: none !important; }
}
