/* =====================================================================
   BETROX Shop · Link 3 · Wettschein-Anzeige
   Design stage 1920×1080 (landscape) or 1080×1920 (portrait, .is-portrait),
   scaled to fit by app.js. Read-only, calm, readable from ~1 m.
   Colours/fonts come from ../shared/tokens.css.
   ===================================================================== */

html, body { height: 100%; margin: 0; overflow: hidden; background: #000; }
body { cursor: none; }

.ws-viewport { position: fixed; inset: 0; overflow: hidden; background: #000; }
.ws-stage {
  position: absolute; left: 0; top: 0;
  width: 1920px; height: 1080px;
  transform-origin: 0 0;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); color: var(--ink);
}

/* ---------------------------------------------------------------- header */
.ws-hdr {
  height: 104px; flex-shrink: 0; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  background: var(--bar); border-bottom: 1px solid var(--line);
}
.ws-hdr-left, .ws-hdr-right { display: flex; align-items: center; gap: 32px; min-width: 0; }
.ws-brand { font-size: 52px; }
.ws-hdr-sep { width: 1px; height: 48px; background: var(--line-3); flex-shrink: 0; }
.ws-hdr-title { display: flex; align-items: baseline; gap: 18px; min-width: 0; }
.ws-hdr-title h1 {
  margin: 0; font-family: var(--cond); font-weight: 700; font-size: 40px; letter-spacing: .04em;
  text-transform: uppercase; line-height: 1; white-space: nowrap;
}
.ws-station {
  padding: 6px 14px; border-radius: 999px; background: var(--tile); color: var(--ink-2);
  font-size: 20px; font-weight: 700; letter-spacing: .04em; white-space: nowrap;
}
.ws-station:empty { display: none; }
.ws-conn { font-size: 20px; padding: 8px 16px; white-space: nowrap; }
.ws-conn.is-online { background: transparent; color: var(--muted); padding: 8px 0; }
.ws-conn.is-online::before { background: var(--ok); }
.ws-clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; gap: 6px; }
.ws-clock-time { font-family: var(--cond); font-weight: 700; font-size: 44px; }
.ws-clock-date { font-size: 20px; font-weight: 600; color: var(--muted); }

/* ---------------------------------------------------------------- main */
.ws-main { flex: 1; min-height: 0; position: relative; padding: 32px 40px; }

.ws-slip {
  height: 100%; display: grid; gap: 32px;
  grid-template-columns: minmax(0, 1fr) 600px; grid-template-rows: minmax(0, 1fr);
}

/* picks column */
.ws-picks { display: flex; flex-direction: column; min-height: 0; gap: 16px; }
.ws-picks-head { display: flex; align-items: baseline; gap: 18px; flex-shrink: 0; }
.ws-picks-title {
  margin: 0; font-family: var(--cond); font-weight: 700; font-size: 30px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2);
}
.ws-picks-count { font-size: 22px; font-weight: 600; color: var(--muted); }
.ws-code {
  margin-left: auto; padding: 6px 14px; border-radius: 999px;
  background: var(--tile); color: var(--ink-2); font-family: var(--cond); font-weight: 700;
  font-size: 22px; letter-spacing: .06em;
}
.ws-more {
  flex-shrink: 0; padding: 8px 16px; border-radius: var(--r); background: var(--tile);
  color: var(--muted); font-size: 20px; font-weight: 600;
}

.ws-list {
  list-style: none; margin: 0; padding: 4px 2px; flex: 1; min-height: 0; overflow: hidden;
  display: grid; grid-auto-rows: max-content; align-content: start; gap: var(--ws-gap, 16px);
}

/* one pick */
.ws-row {
  --row-bg: var(--card);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: var(--ws-col-gap, 26px); padding: var(--ws-pad, 22px 26px);
  background: var(--row-bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-sizing: border-box;
}
.ws-row-num {
  width: var(--ws-num, 52px); height: var(--ws-num, 52px); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--tile); color: var(--ink-2);
  font-family: var(--cond); font-weight: 700; font-size: calc(var(--ws-num, 52px) * .5);
}
.ws-row-main { min-width: 0; display: flex; flex-direction: column; gap: var(--ws-line-gap, 8px); }
.ws-row-meta {
  display: flex; align-items: center; gap: 14px; min-width: 0;
  font-size: var(--ws-meta, 20px); font-weight: 600; color: var(--muted); white-space: nowrap;
}
.ws-league { overflow: hidden; text-overflow: ellipsis; }
.ws-kick { color: var(--ink-2); }
.ws-live { display: inline-flex; align-items: center; gap: 8px; font-size: .85em; letter-spacing: .06em; }
.ws-live .bx-live-dot { width: 10px; height: 10px; }
.ws-min { color: var(--live-ink); font-family: var(--cond); font-weight: 700; font-size: 1.15em; }
.ws-min.is-ht { color: var(--ht); }
.ws-score { color: var(--ink); font-family: var(--cond); font-weight: 700; font-size: 1.15em; }
.ws-row-match {
  font-family: var(--cond); font-weight: 700; font-size: var(--ws-match, 40px); line-height: 1.08;
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ws-row-pick {
  display: flex; align-items: center; gap: 16px; min-width: 0; white-space: nowrap;
  font-size: var(--ws-pick, 26px); font-weight: 600;
}
.ws-mk { color: var(--muted); flex-shrink: 0; }
.ws-pk { display: inline-flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); }
.ws-pk-code {
  flex-shrink: 0; padding: .1em .5em; border-radius: var(--r-sm);
  background: var(--accent); color: var(--on-accent, #0B0D12);
  font-family: var(--cond); font-weight: 800; line-height: 1.15;
}
.ws-pk-text { overflow: hidden; text-overflow: ellipsis; }

/* odds tile (Variant A blink comes from tokens.css .bx-tile.chg) */
.ws-row-odds { display: flex; }
.bx-tile.ws-odd {
  width: var(--ws-odd-w, 190px); height: var(--ws-odd-h, 112px); padding: 0 18px;
  flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.ws-odd .k { font-size: var(--ws-odd-k, 18px); letter-spacing: .08em; text-transform: uppercase; }
.ws-odd .k.ws-old {
  text-transform: none; letter-spacing: 0; color: var(--muted); text-decoration: line-through;
  font-family: var(--cond); font-weight: 700; font-size: calc(var(--ws-odd-k, 18px) * 1.25);
}
.ws-odd .vv { display: flex; align-items: center; gap: 10px; }
.ws-odd .bx-arr { width: calc(var(--ws-odd-v, 56px) * .32); height: calc(var(--ws-odd-v, 56px) * .27); }
.ws-odd .v { font-size: var(--ws-odd-v, 56px); line-height: 1; }
.ws-odd-off {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--ws-odd-off, 22px); font-weight: 700; color: var(--muted);
  letter-spacing: .04em; text-transform: uppercase;
}
.ws-odd-off svg { width: 1.3em; height: 1.3em; }

/* states */
.ws-row.is-suspended { box-shadow: inset 6px 0 0 var(--ht); border-color: #4A3A14; }
.ws-row.is-suspended .ws-odd { box-shadow: inset 0 0 0 2px #5A4515; }
.ws-row.is-suspended .ws-odd-off { color: var(--ht); }
.ws-row.is-removed { opacity: .5; box-shadow: inset 6px 0 0 var(--live); }
.ws-row.is-removed .ws-row-match { text-decoration: line-through; text-decoration-thickness: 2px; }
.ws-row.is-clipped { display: none; }
.ws-row.is-collapsing {
  overflow: hidden; transition: height var(--ws-collapse, 260ms) ease, padding var(--ws-collapse, 260ms) ease, margin var(--ws-collapse, 260ms) ease;
  padding-top: 0; padding-bottom: 0; border-width: 0; margin-bottom: calc(var(--ws-gap, 16px) * -1);
}

/* densities: chosen by app.js (largest that fits) */
.ws-list[data-density="xl"] {
  --ws-gap: 18px; --ws-pad: 26px 30px; --ws-num: 60px; --ws-meta: 22px; --ws-match: 46px; --ws-pick: 30px;
  --ws-odd-w: 210px; --ws-odd-h: 124px; --ws-odd-v: 64px; --ws-odd-k: 20px; --ws-line-gap: 10px;
}
.ws-list[data-density="lg"] {
  --ws-gap: 16px; --ws-pad: 20px 26px; --ws-num: 52px; --ws-meta: 20px; --ws-match: 40px; --ws-pick: 26px;
  --ws-odd-w: 190px; --ws-odd-h: 108px; --ws-odd-v: 56px; --ws-odd-k: 20px;
}
.ws-list[data-density="md"] {
  --ws-gap: 12px; --ws-pad: 14px 22px; --ws-num: 44px; --ws-meta: 18px; --ws-match: 33px; --ws-pick: 22px;
  --ws-odd-w: 168px; --ws-odd-h: 86px; --ws-odd-v: 46px; --ws-odd-k: 16px; --ws-line-gap: 5px; --ws-col-gap: 22px;
}
.ws-list[data-density="sm"] {
  --ws-gap: 10px; --ws-pad: 10px 18px; --ws-num: 38px; --ws-meta: 16px; --ws-match: 28px; --ws-pick: 20px;
  --ws-odd-w: 148px; --ws-odd-h: 66px; --ws-odd-v: 38px; --ws-odd-k: 14px; --ws-line-gap: 3px; --ws-col-gap: 18px;
  --ws-odd-off: 18px;
}
.ws-list[data-density="xs"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  --ws-gap: 7px; --ws-pad: 7px 14px; --ws-num: 30px; --ws-meta: 14px; --ws-match: 23px; --ws-pick: 17px;
  --ws-odd-w: 112px; --ws-odd-h: 50px; --ws-odd-v: 30px; --ws-odd-k: 12px; --ws-line-gap: 2px; --ws-col-gap: 12px;
  --ws-odd-off: 14px;
}
.ws-list[data-density="sm"] .ws-row-meta, .ws-stage:not(.is-portrait) .ws-list[data-density="xs"] .ws-row-meta { gap: 10px; }
/* large densities: a long pick text ("Getafe CF oder Unentschieden") may wrap instead of being cut */
.ws-list[data-density="xl"] .ws-row-pick, .ws-list[data-density="lg"] .ws-row-pick { flex-wrap: wrap; row-gap: 6px; }
.ws-list[data-density="xl"] .ws-pk, .ws-list[data-density="lg"] .ws-pk { white-space: normal; }
.ws-list[data-density="xl"] .ws-pk-text, .ws-list[data-density="lg"] .ws-pk-text { overflow: visible; }

/* ---------------------------------------------------------------- summary */
.ws-sum {
  display: flex; flex-direction: column; gap: 26px; min-height: 0;
  padding: 30px 32px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl);
}
.ws-sum-label {
  font-size: 20px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase;
}
.ws-sum-sub { margin-top: 6px; font-size: 20px; font-weight: 600; color: var(--muted); min-height: 1em; }
.ws-sum-sub:empty { display: none; }

.ws-type { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; padding: 6px; border-radius: var(--r-lg); background: var(--bg); }
.ws-type-opt {
  height: 64px; border-radius: var(--r); display: flex; align-items: center; justify-content: center;
  font-family: var(--cond); font-weight: 700; font-size: 30px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted-2, #5E667A);
}
.ws-type-opt.is-active { background: var(--accent); color: var(--on-accent, #0B0D12); }
.ws-type-hint { margin-top: 10px; font-size: 20px; font-weight: 600; color: var(--ink-2); }

.ws-sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ws-sum-cell { padding: 18px 20px; border-radius: var(--r-lg); background: var(--tile); min-width: 0; }
.ws-sum-value {
  margin-top: 8px; font-family: var(--cond); font-weight: 700; font-size: 52px; line-height: 1;
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ws-sum-value.is-open { font-size: 30px; line-height: 52px; color: var(--ink-2); }
.ws-sum-odds { color: var(--accent); }
.ws-sum-cell.is-na .ws-sum-odds { color: var(--muted); }

.ws-fee {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 14px 20px; border-radius: var(--r-lg); background: var(--tile);
}
.ws-fee-label { font-size: 20px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.ws-fee-value { font-family: var(--cond); font-weight: 700; font-size: 36px; line-height: 1; color: var(--ink); white-space: nowrap; }
.ws-fee-value.is-open { color: var(--ink-2); }

.ws-win {
  padding: 22px 24px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, #221D0B 0%, #17150C 100%); border: 1px solid #4A3D0E;
}
.ws-win .ws-sum-label { color: #D9B640; }
.ws-win-value {
  margin-top: 6px; font-family: var(--cond); font-weight: 800; font-size: 96px; line-height: 1;
  color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ws-win-value.is-open { color: #6F6232; }
.ws-win .ws-sum-sub { color: #B8A35C; }

.ws-notices { display: flex; flex-direction: column; gap: 12px; }
.ws-notices:empty { display: none; }
.ws-notice { font-size: 20px; line-height: 1.3; }
.ws-sum-note { margin: auto 0 0; font-size: 20px; font-weight: 600; color: var(--muted); }

/* a total that just changed */
.is-bump { animation: ws-bump .9s var(--ease, ease-out); }
@keyframes ws-bump {
  0% { transform: scale(1.06); color: #FFFFFF; }
  100% { transform: none; }
}
.ws-sum-value, .ws-win-value { transform-origin: left center; }

/* ---------------------------------------------------------------- empty state */
.ws-empty, .ws-done {
  position: absolute; inset: 32px 40px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-xl);
  background:
    radial-gradient(ellipse 60% 55% at 50% 42%, rgba(255, 199, 0, .07), transparent 70%),
    var(--bar);
  border: 1px solid var(--line);
}
.ws-empty-card, .ws-done-card { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 1100px; padding: 0 40px; }
.ws-empty-brand { font-size: 112px; }
.ws-empty-icon {
  margin-top: 56px; width: 152px; height: 152px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--tile); color: var(--accent); box-shadow: inset 0 0 0 2px var(--line-3);
  animation: ws-breathe 4.8s ease-in-out infinite;
}
@keyframes ws-breathe { 0%, 100% { box-shadow: inset 0 0 0 2px var(--line-3), 0 0 0 0 rgba(255, 199, 0, 0); } 50% { box-shadow: inset 0 0 0 2px #4A3D0E, 0 0 0 18px rgba(255, 199, 0, .05); } }
.ws-empty-title { margin: 40px 0 0; font-family: var(--cond); font-weight: 700; font-size: 72px; line-height: 1.05; }
.ws-empty-text { margin: 22px 0 0; font-size: 30px; line-height: 1.4; font-weight: 500; color: var(--ink-2); max-width: 980px; }
.is-misconfigured .ws-empty-icon { color: var(--warn); animation: none; }

/* ticket placed */
.ws-done-icon {
  width: 168px; height: 168px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--ok-tint); color: var(--ok); box-shadow: inset 0 0 0 3px #2E7A4C;
  animation: bx-pop .5s var(--ease, ease-out) both;
}
.ws-done-icon svg { stroke-width: 2.6; }
.ws-done-title { margin: 44px 0 0; font-family: var(--cond); font-weight: 800; font-size: 88px; line-height: 1; }
.ws-done-text { margin: 20px 0 0; font-size: 34px; color: var(--ink-2); }
.ws-done-id { margin-top: 30px; padding: 10px 22px; border-radius: 999px; background: var(--tile); font-family: var(--cond); font-weight: 700; font-size: 30px; letter-spacing: .06em; color: var(--ink-2); }
.ws-done-id:empty { display: none; }

/* ---------------------------------------------------------------- footer */
.ws-foot .bx-legal { font-size: 20px; }   /* ~1 m viewing distance: >= 20 px */
.ws-foot {
  height: 64px; flex-shrink: 0; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--bar); border-top: 1px solid var(--line);
}
.ws-foot-note { font-size: 20px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* ---------------------------------------------------------------- portrait 1080×1920 */
.is-portrait .ws-hdr { height: 120px; padding: 0 36px; gap: 20px; }
.is-portrait .ws-brand { font-size: 46px; }
.is-portrait .ws-hdr-left { gap: 22px; }
.is-portrait .ws-hdr-right { gap: 22px; }
.is-portrait .ws-hdr-title { flex-direction: column; align-items: flex-start; gap: 8px; }
.is-portrait .ws-hdr-title h1 { font-size: 34px; }
.is-portrait .ws-station { font-size: 20px; padding: 4px 12px; }
.is-portrait .ws-clock-time { font-size: 40px; }
.is-portrait .ws-conn { font-size: 20px; }
.is-portrait .ws-main { padding: 28px 32px; }
.is-portrait .ws-slip { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 24px; }
.is-portrait .ws-sum {
  display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 16px; padding: 24px;
}
.is-portrait .ws-sum-block { grid-column: 1; padding: 18px 20px; border-radius: var(--r-lg); background: var(--tile); }
.is-portrait .ws-type { margin-top: 10px; }
.is-portrait .ws-type-opt { height: 54px; font-size: 26px; }
.is-portrait .ws-type-hint { font-size: 20px; }
.is-portrait .ws-sum-grid { display: contents; }
.is-portrait .ws-sum-value { font-size: 50px; }
.is-portrait .ws-win, .is-portrait .ws-fee, .is-portrait .ws-notices, .is-portrait .ws-sum-note { grid-column: 1 / -1; }
.is-portrait .ws-win { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.is-portrait .ws-win .ws-sum-label { width: 100%; }
.is-portrait .ws-win-value { font-size: 104px; margin-top: 0; }
.is-portrait .ws-win .ws-sum-sub { margin-top: 0; font-size: 21px; text-align: right; }
.is-portrait .ws-sum-note { margin: 0; text-align: center; }
.is-portrait .ws-list[data-density="xl"] { --ws-match: 44px; --ws-odd-w: 196px; }
.is-portrait .ws-empty, .is-portrait .ws-done { inset: 28px 32px; }
.is-portrait .ws-empty-brand { font-size: 104px; }
.is-portrait .ws-empty-title { font-size: 66px; }
.is-portrait .ws-empty-text { font-size: 30px; }
.is-portrait .ws-foot {
  height: 108px; padding: 14px 32px; flex-direction: column; justify-content: center; gap: 8px;
}

/* ---------------------------------------------------------------- QA: freeze effects for screenshots */
.qa-hold .chg, .qa-hold .chg .v, .qa-hold .chg .bx-arr, .qa-hold .bx-flash { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  .ws-empty-icon, .is-bump, .ws-done-icon { animation: none; }
  .ws-row.is-collapsing { transition: none; }
}

/* "Nicht verfügbar" / "Gesperrt" centred inside the tile */
.ws-odd-off { justify-content: center; text-align: center; line-height: 1.1; }
.ws-odd.is-removed .ws-odd-off { font-size: calc(var(--ws-odd-off, 22px) * .85); }
.ws-empty-text code { font-family: var(--mono); font-size: .85em; color: var(--accent); white-space: nowrap; }

/* compact densities: two text lines per pick
   line 1: match ............ time / LIVE minute score   line 2: market + pick.
   The league name is dropped here (secondary, saves a whole line). */
.ws-list[data-density="sm"] .ws-row-main, .ws-stage:not(.is-portrait) .ws-list[data-density="xs"] .ws-row-main {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "match meta" "pick pick";
  column-gap: 14px; row-gap: var(--ws-line-gap, 3px); align-items: center;
}
.ws-list[data-density="sm"] .ws-row-match, .ws-stage:not(.is-portrait) .ws-list[data-density="xs"] .ws-row-match { grid-area: match; }
.ws-list[data-density="sm"] .ws-row-meta, .ws-stage:not(.is-portrait) .ws-list[data-density="xs"] .ws-row-meta { grid-area: meta; }
.ws-list[data-density="sm"] .ws-row-pick, .ws-stage:not(.is-portrait) .ws-list[data-density="xs"] .ws-row-pick { grid-area: pick; overflow: hidden; }
.ws-list[data-density="sm"] .ws-league, .ws-stage:not(.is-portrait) .ws-list[data-density="xs"] .ws-league { display: none; }

/* summary values shrink (app.js) instead of being cut */
.ws-sum-value, .ws-win-value { text-overflow: clip; }

/* connection lost: the slip may be outdated, show it dimmed until the stream is back */
.ws-slip { transition: opacity .4s ease; }
.is-offline .ws-slip { opacity: .55; }
.is-offline .ws-conn { font-size: 22px; }

/* landscape: with notices the column gets full, the generic hint makes room for them */
.ws-sum { overflow: hidden; }
.ws-stage:not(.is-portrait) .ws-notices:not(:empty) + .ws-sum-note { display: none; }
