/* TU Live Score widget — editorial liveblog cards + broadcast scoreboard.
 *
 * Surface 1: Dark scoreboard at top (matchup, status pill, sets table)
 * Surface 2: Per-event cards with left clay rail (time + tennis icon)
 *            and bold sans heading + body. Critical events flip to a
 *            full clay-filled card with white text.
 *
 * Mobile-first. Class-prefixed.
 *
 * IMPORTANT — theme injection: the parent theme injects
 *   style="background-image: url('/wp-content/themes/tenisuzivo/images/ol_N.png')"
 * inline on every <li> in post content. Inline styles beat external CSS,
 * so we use !important on background-* and list-style on .tu-live-score__event
 * to defeat that override.
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700;9..40,800;9..40,900&display=swap');

.tu-live-score {
  --tu-clay:        #c8472b;
  --tu-clay-deep:   #8a2f1a;
  --tu-clay-soft:   rgba(200, 71, 43, 0.08);
  --tu-clay-mid:    rgba(200, 71, 43, 0.18);
  --tu-clay-glow:   rgba(200, 71, 43, 0.45);

  /* Wimbledon green for match-start cards (the iconic grass-court emerald) */
  --tu-green:       #006b3f;
  --tu-green-deep:  #00482a;
  --tu-green-glow:  rgba(0, 107, 63, 0.40);

  /* Australian Open blue for set-end cards */
  --tu-blue:        #1976a3;
  --tu-blue-deep:   #0e527a;
  --tu-blue-glow:   rgba(25, 118, 163, 0.42);

  /* Roland Garros amber — used only for the qualifying chip in the header */
  --tu-amber:       #b07020;
  --tu-amber-deep:  #7d4f15;
  --tu-amber-soft:  rgba(176, 112, 32, 0.16);

  --tu-ink:         #15120e;
  --tu-ink-2:       #44403a;
  --tu-ink-3:       #78736a;

  --tu-paper:       #fdfaf3;
  --tu-card:        #f3eee2;
  --tu-card-deep:   #e9e2d2;
  --tu-line:        rgba(21, 18, 14, 0.08);

  --tu-board-bg:    #14110d;
  --tu-board-bg-2:  #1f1a13;
  --tu-board-fg:    #f5ecd8;
  --tu-board-muted: #a89e89;     /* loser-row + muted text — lifted from #877d6a */
  --tu-board-line:  rgba(245, 236, 216, 0.10);

  --tu-font:    'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --tu-radius:      8px;
  --tu-card-radius: 12px;

  font-family: var(--tu-font);
  font-feature-settings: 'ss01', 'cv11';
  font-size: 16px;
  line-height: 1.55;
  color: var(--tu-ink);
  margin: 1.6em 0;
  background: var(--tu-paper);
  border: 1px solid var(--tu-line);
  border-radius: var(--tu-card-radius);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.02),
    0 18px 44px -28px rgba(21, 18, 14, 0.32);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ════════════════════════════════════════════════════════════════════
 * SCOREBOARD CARD (header + sets table)
 * ──────────────────────────────────────────────────────────────────── */

/* Header: title on the left + status pill on the right, on a single row
   (both viewports). Tournament info has moved to its own muted strip
   below the sets table — see .tu-live-score__tournament. */
.tu-live-score__header {
  position: relative;
  background: linear-gradient(180deg, var(--tu-board-bg-2) 0%, var(--tu-board-bg) 100%);
  color: var(--tu-board-fg);
  /* Horizontal inset (24/32px) is mirrored on the sets table (th left,
     last-child right) so title, player names, and score columns share
     the same vertical guides as the status pill. */
  padding: 16px 24px 14px;
  margin: 0;
  border-bottom: 1px solid var(--tu-board-line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Title — two-line stack alongside the ATP-tier logo. Top line: circuit
   (small uppercase tracked gray). Bottom line: round (bigger white)
   with optional KVALIF chip inline. Logo vertically centers to the
   middle of the two-line stack. */
.tu-live-score__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.tu-live-score__title-logo {
  display: block;
  height: 32px;
  width: auto;
  max-width: 64px;       /* keep wide PNGs (Slam logos) from dominating */
  object-fit: contain;
  flex-shrink: 0;
}

.tu-live-score__title-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.tu-live-score__title-circuit {
  font-family: var(--tu-font);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tu-board-muted);
  line-height: 1;
}

.tu-live-score__title-round {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--tu-font);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--tu-board-fg);
  line-height: 1.15;
}

.tu-live-score__title-round-text {
  display: inline-block;
}

/* KVALIF chip — small uppercase amber pill rendered inline next to the round */
.tu-live-score__title-qualif {
  display: inline-block;
  padding: 1px 7px;
  font-family: var(--tu-font);
  font-weight: 700;
  font-size: 0.58rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #f1d8a6;
  background: var(--tu-amber-soft);
  border: 1px solid rgba(243, 196, 124, 0.30);
  border-radius: 999px;
  vertical-align: 1px;
}

/* Status pill — sits to the right of the title (both viewports). */
.tu-live-score__status {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 4px 11px 4px 9px;
  font-family: var(--tu-font);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--tu-board-fg);
  background: rgba(245, 236, 216, 0.08);
  border: 1px solid var(--tu-board-line);
  border-radius: 999px;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.tu-live-score__status--live {
  /* Slightly stronger surface so the pulsing dot reads */
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.40);
}

.tu-live-score__status-glyph {
  display: inline-block;
  margin-right: 6px;
  font-size: 0.85rem;
  line-height: 1;
}

.tu-live-score__status-text {
  display: inline-block;
}

/* Tournament footer strip — only the date/time/year. Tournament name + round
   moved up to the title row; this strip now reads as a quiet date stamp. */
.tu-live-score__tournament {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  background: var(--tu-board-bg);
  color: var(--tu-board-muted);
  border-top: 1px solid var(--tu-board-line);
  font-family: var(--tu-font);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.tu-live-score__tournament-when {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Sets table ───────────────────────────────────────────────────── */

.tu-live-score__sets {
  width: 100%;
  box-sizing: border-box; /* so border-right counts inside width:100% */
  background: var(--tu-board-bg);
  color: var(--tu-board-fg);
  border-collapse: collapse;
  border-spacing: 0;
  margin: 0;
  font-variant-numeric: tabular-nums;
  table-layout: auto;
}

/* Right-edge inset on the table itself (not per-cell padding) so all
   cells stay symmetric and digit/underline alignment stays centered.
   Border colour matches the scoreboard surface so it reads as empty
   dark space rather than a visible border. */
.tu-live-score__sets:not(.tu-live-score__sets--waiting) {
  border-right: 24px solid var(--tu-board-bg);
}

.tu-live-score__sets tr + tr th,
.tu-live-score__sets tr + tr td {
  border-top: 1px solid var(--tu-board-line);
}

.tu-live-score__sets th {
  text-align: left;
  font-family: var(--tu-font);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0;
  color: var(--tu-board-fg);
  /* Match the header's left padding so player names align horizontally
     with the title text above. The winner ▶ sits in the small gutter. */
  padding: 16px 8px 16px 24px;
  vertical-align: middle;
  background: transparent;
  white-space: nowrap;
  width: 100%;
  position: relative;
}

/* (right-edge inset moved up to .tu-live-score__sets via border-right —
   per-cell padding broke digit/underline centering on the last cell) */

/* Winner-row indicator — small white triangle pointing right at the winning
   player's name. Sits roughly mid-gutter between the box edge and the
   player name (which lives at padding-left: 24px). */
.tu-live-score__sets-row--winner > th::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top:    5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left:   8px solid var(--tu-board-fg);
}

.tu-live-score__sets td {
  text-align: center;
  vertical-align: middle;
  padding: 16px 4px;
  width: 1%;
  min-width: 38px;
  font-family: var(--tu-font);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1;
  color: var(--tu-board-muted);
  background: transparent;
  position: relative;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  overflow: hidden;        /* clip the slot-roll animation inside the cell */
}

/* Inner digit span — animated by the slot-roll keyframes when the cell
   gets the ...-pulse / ...-flash modifier class on score change. */
.tu-live-score__cell-digit {
  display: inline-block;
}

/* Tiebreak superscript — when a set ends 7-6 / 6-7 the api-tennis row
   encodes mini-points as a decimal (e.g. "7.7" / "6.5"); JS extracts
   them and renders this <sup>. ATP-broadcast convention — small bold
   number to the upper-right of the games digit. Inherits cell color
   so winner row is bright, loser row is muted. */
.tu-live-score__cell-tb {
  font-size: 0.55em;
  font-weight: 700;
  vertical-align: super;
  margin-left: 1px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  /* Slightly de-emphasised relative to the main digit so the games-won
     stays the dominant read. */
  opacity: 0.85;
}

/* Set-incomplete leader: brighter score for the player ahead in the
   current set. Keeps trailing player at the muted base color so the
   distinction is immediate. */
.tu-live-score__sets td.tu-live-score__sets-leading {
  color: var(--tu-board-fg);
}

/* Set winner — fully bright + clay underline. Overrides leading. */
.tu-live-score__sets td.tu-live-score__sets-winner {
  color: var(--tu-board-fg);
  font-weight: 800;
}

.tu-live-score__sets td.tu-live-score__sets-winner::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 9px;
  transform: translateX(-50%);
  width: 22px; height: 2px;
  background: var(--tu-clay);
  border-radius: 1px;
}

/* Loser-row treatment — JS adds .tu-live-score__sets-row--loser to the row
   whose player lost (only when match is concluded and someone is ahead on
   sets). Mute name + game-point cell to match the row's losing-set scores. */
.tu-live-score__sets-row--loser th {
  color: var(--tu-board-muted);
  font-weight: 600;
}

.tu-live-score__sets-row--loser td.tu-live-score__game-point {
  opacity: 0.55;
}

/* Game-point cell — current point in play (live matches only). The TD
   itself is just a transparent padded container so the red chip inside
   has visible gaps from the row borders + neighboring cells. The chip
   itself is the inner __cell-digit span with its own red background. */
.tu-live-score__sets td.tu-live-score__game-point {
  background: transparent;
  padding: 6px 6px;
  margin: 0;
  min-width: 40px;
  width: 1%;
  letter-spacing: 0;
  position: relative;
}

.tu-live-score__sets td.tu-live-score__game-point .tu-live-score__cell-digit {
  display: inline-block;
  font-family: var(--tu-font);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
  color: white;
  background: var(--tu-clay);
  padding: 5px 9px;
  border-radius: 5px;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

/* Slot-roll animation triggered when a cell's digit changes. The td has
   `overflow: hidden` so the inner __cell-digit translating up reads as a
   slot-machine reel landing into place. Subtle (~0.4s, no flash). */
.tu-live-score__sets td.tu-live-score__game-point--flash .tu-live-score__cell-digit,
.tu-live-score__sets td.tu-live-score__sets-pulse .tu-live-score__cell-digit {
  animation: tu-live-cell-slot 0.45s cubic-bezier(.2, .7, .3, 1);
}

@keyframes tu-live-cell-slot {
  0%   { transform: translateY(80%); opacity: 0; }
  60%  { opacity: 1; }
  100% { transform: translateY(0);   opacity: 1; }
}

/* Serve indicator — wrapped in a span so we can shrink the emoji and add
   breathing room from the player surname. */
.tu-live-score__serve-indicator {
  display: inline-block;
  margin-left: 10px;
  font-size: 0.78rem;
  vertical-align: 1px;
  line-height: 1;
}

/* ════════════════════════════════════════════════════════════════════
 * WAITING-STATE CELL (pre-match scoreboard with time + day in one cell)
 * ──────────────────────────────────────────────────────────────────── */

.tu-live-score__sets--waiting td.tu-live-score__waiting-cell {
  text-align: center;
  vertical-align: middle;
  padding: 18px 18px;
  width: auto;
  min-width: 0;
  font-family: var(--tu-font);
  color: var(--tu-board-fg);
}

.tu-live-score__sets--waiting .tu-live-score__waiting-time {
  display: block;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0;
  color: var(--tu-clay);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.tu-live-score__sets--waiting .tu-live-score__waiting-day {
  display: block;
  margin-top: 4px;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--tu-board-muted);
}

/* ════════════════════════════════════════════════════════════════════
 * LIVE-ICON-WRAPPER (lifted verbatim from user's character.21-draw.com
 * landing page, scoped under .tu-live-score). Pulsating red SVG dot
 * embedded inside the live-state status pill.
 * ──────────────────────────────────────────────────────────────────── */

.tu-live-score .live-icon-wrapper {
  color: #ef4444;
  height: 16px;
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
}
.tu-live-score .live-icon-svg {
  height: 16px;
  width: 16px;
}
.tu-live-score .live-icon-ring {
  animation: live-ring-scale 2s infinite, live-ring-fade 2s infinite;
  fill: none;
  stroke: currentColor;
  stroke-width: 1px;
  transform-origin: center center;
}
.tu-live-score .live-icon-area {
  animation: live-area-pulse 2s infinite ease-out;
  fill: currentColor;
  stroke: none;
  transform-origin: center center;
}
.tu-live-score .live-icon-center {
  fill: currentColor;
  stroke: none;
}

@keyframes live-ring-scale {
  0%        { transform: scale(0.1); }
  50%, to   { transform: scale(1); }
}
@keyframes live-ring-fade {
  2%        { opacity: 1; }
  40%       { opacity: 0.6; }
  60%, to   { opacity: 0; }
}
@keyframes live-area-pulse {
  0%        { opacity: 1;   transform: scale(0.1); }
  25%       { opacity: 0.7; }
  50%, to   { opacity: 0;   transform: scale(1); }
}

/* ════════════════════════════════════════════════════════════════════
 * COMMENTARY FEED (per-event cards)
 * ──────────────────────────────────────────────────────────────────── */

.tu-live-score__events {
  list-style: none;
  margin: 0;
  padding: 18px 24px 22px;
  background: var(--tu-paper);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Section label — short clay accent + hairline rule across the feed */
.tu-live-score__events::before {
  content: 'Tekstualni prenos';
  display: block;
  font-family: var(--tu-font);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--tu-clay);
  margin: 4px 4px 14px;
  padding-bottom: 10px;
  background:
    linear-gradient(to right, var(--tu-clay) 0, var(--tu-clay) 36px, transparent 36px) bottom left / 100% 2px no-repeat,
    linear-gradient(to right, var(--tu-line) 0, var(--tu-line) 100%) bottom left / 100% 1px no-repeat;
}

/* ── Each event = a card with left rail + content body ─────────────
 * Layout uses absolute positioning for the rail (the .event-time span)
 * because grid + a tall full-height column kept mis-sizing the body
 * row. Absolute rail naturally fills card height; content sits on the
 * right via padding-left. */

.tu-live-score__event {
  position: relative;

  list-style: none !important;
  margin: 0 !important;
  padding: 0 0 0 64px !important; /* room for the absolute rail */

  /* Defeat the theme's inline background-image (ol_N.png list markers) */
  background-image: none !important;
  background-color: var(--tu-card) !important;
  background-repeat: no-repeat !important;
  background-position: 0 0 !important;
  background-size: auto !important;

  border: 1px solid var(--tu-line);
  border-radius: var(--tu-radius);
  overflow: hidden;
  font-family: var(--tu-font);
  color: var(--tu-ink);
  min-height: 88px; /* keeps short cards visually balanced w/ the rail */
}

/* The TIME span becomes the left rail (clay band, white text + tennis icon) */
.tu-live-score__event-time {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 64px;
  background: var(--tu-clay);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 6px 16px;
  font-family: var(--tu-font);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}

/* Tennis ball icon below the timestamp */
.tu-live-score__event-time::after {
  content: '';
  display: block;
  width: 28px;
  height: 28px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'><circle cx='16' cy='16' r='12'/><path d='M5.5 11C9 13 13 13 16 11s7-2 10.5 0'/><path d='M5.5 21C9 19 13 19 16 21s7 2 10.5 0'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.96;
}

/* Headline = the editorial title (block, big, bold sans) */
.tu-live-score__event-headline {
  display: block;
  font-family: var(--tu-font);
  font-weight: 700;
  font-size: 1.22rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  padding: 18px 20px 2px;
  margin: 0;
  color: var(--tu-ink);
  text-wrap: balance;
}

/* Hide the " · " separator span — headline + body now stack as blocks */
.tu-live-score__event-separator {
  display: none;
}

/* Body — readable sans paragraph(s). pre-line preserves API \n linebreaks. */
.tu-live-score__event-body {
  display: block;
  font-family: var(--tu-font);
  font-weight: 400;
  font-size: 0.98rem;
  line-height: 1.55;
  padding: 8px 20px 18px;
  margin: 0;
  color: var(--tu-ink-2);
  white-space: pre-line;
}

/* When no headline span exists, the body fills the right column with full padding */
.tu-live-score__event:not(:has(.tu-live-score__event-headline)) .tu-live-score__event-body {
  padding: 18px 20px;
  font-weight: 500;
  color: var(--tu-ink);
  font-size: 1rem;
}

/* ── Variants ─────────────────────────────────────────────────────── */

/* Key event: stronger card border accent (clay-tinted), heavier body */
.tu-live-score__event--key {
  background-color: var(--tu-card) !important;
  border-color: var(--tu-clay-mid);
}

.tu-live-score__event--key .tu-live-score__event-body {
  font-weight: 500;
}

/* CRITICAL event: full clay flip — entire card filled, white text. The big
   editorial moment (set won, break point converted, match won, etc.). */
.tu-live-score__event--critical {
  background-color: var(--tu-clay) !important;
  border-color: var(--tu-clay-deep);
  box-shadow: 0 6px 22px -10px var(--tu-clay-glow);
}

.tu-live-score__event--critical .tu-live-score__event-time {
  background: var(--tu-clay-deep);
}

.tu-live-score__event--critical .tu-live-score__event-headline {
  color: white;
  font-weight: 800;
  font-size: 1.32rem;
}

.tu-live-score__event--critical .tu-live-score__event-body {
  color: rgba(255, 255, 255, 0.93);
  font-weight: 500;
}

.tu-live-score__event--critical:not(:has(.tu-live-score__event-headline)) .tu-live-score__event-body {
  color: white;
  font-weight: 600;
  font-size: 1.05rem;
}

/* ── Type-distinct cards (rule_name-driven) ─────────────────────────
 * Each major event type gets a distinct background colour + icon.
 * Declared after --critical so these overrides win when both classes
 * apply (e.g. a critical-importance match-finished event). All four
 * icons (tennis ball / flag / check-circle / trophy) share viewBox 32,
 * stroke-width 2.4, round caps — they read as one cohesive icon family. */

/* MATCH START — court-green flip + flag icon */
.tu-live-score__event--match-start {
  background-color: var(--tu-green) !important;
  border-color: var(--tu-green-deep);
  box-shadow: 0 6px 22px -10px var(--tu-green-glow);
}
.tu-live-score__event--match-start .tu-live-score__event-time {
  background: var(--tu-green-deep);
}
.tu-live-score__event--match-start .tu-live-score__event-headline { color: white; font-weight: 800; }
.tu-live-score__event--match-start .tu-live-score__event-body { color: rgba(255,255,255,0.93); font-weight: 500; }
.tu-live-score__event--match-start:not(:has(.tu-live-score__event-headline)) .tu-live-score__event-body { color: white; font-weight: 600; font-size: 1.05rem; }
.tu-live-score__event--match-start .tu-live-score__event-time::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M9 5v22'/><path d='M9 6h14l-3.5 4.5 3.5 4.5H9'/></svg>");
}

/* SET END — AO blue flip + check-in-circle icon */
.tu-live-score__event--set-end {
  background-color: var(--tu-blue) !important;
  border-color: var(--tu-blue-deep);
  box-shadow: 0 6px 22px -10px var(--tu-blue-glow);
}
.tu-live-score__event--set-end .tu-live-score__event-time {
  background: var(--tu-blue-deep);
}
.tu-live-score__event--set-end .tu-live-score__event-headline { color: white; font-weight: 800; }
.tu-live-score__event--set-end .tu-live-score__event-body { color: rgba(255,255,255,0.93); font-weight: 500; }
.tu-live-score__event--set-end:not(:has(.tu-live-score__event-headline)) .tu-live-score__event-body { color: white; font-weight: 600; font-size: 1.05rem; }
.tu-live-score__event--set-end .tu-live-score__event-time::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><circle cx='16' cy='16' r='12'/><path d='M10.5 16.2l4 4 7-8'/></svg>");
}

/* MATCH END — clay flip + trophy icon (matches the sidebar red) */
.tu-live-score__event--match-end {
  background-color: var(--tu-clay) !important;
  border-color: var(--tu-clay-deep);
  box-shadow: 0 6px 22px -10px var(--tu-clay-glow);
}
.tu-live-score__event--match-end .tu-live-score__event-time {
  background: var(--tu-clay-deep);
}
.tu-live-score__event--match-end .tu-live-score__event-headline { color: white; font-weight: 800; }
.tu-live-score__event--match-end .tu-live-score__event-body { color: rgba(255,255,255,0.93); font-weight: 500; }
.tu-live-score__event--match-end:not(:has(.tu-live-score__event-headline)) .tu-live-score__event-body { color: white; font-weight: 600; font-size: 1.05rem; }
.tu-live-score__event--match-end .tu-live-score__event-time::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M11 6h10v7a5 5 0 0 1-10 0V6z'/><path d='M11 8H7c0 3 2 5 4 5'/><path d='M21 8h4c0 3-2 5-4 5'/><path d='M16 18v4'/><path d='M12 26h8'/><path d='M13.5 22h5v4h-5z'/></svg>");
}

/* New event entrance */
.tu-live-score__event--enter {
  animation: tu-live-event-enter .65s cubic-bezier(.2, .7, .3, 1);
}

@keyframes tu-live-event-enter {
  0%   { opacity: 0; transform: translateY(-4px); max-height: 0; margin-top: -12px; }
  100% { opacity: 1; transform: translateY(0); max-height: 40em; margin-top: 0; }
}

/* ════════════════════════════════════════════════════════════════════
 * NOT FOUND / LOADING / STALE
 * ──────────────────────────────────────────────────────────────────── */

.tu-live-score__notfound,
.tu-live-score__loading {
  font-family: var(--tu-font);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--tu-ink-2);
  padding: 22px 18px;
  text-align: center;
  background: var(--tu-paper);
}

.tu-live-score__loading {
  color: var(--tu-ink-3);
}

.tu-live-score__loading::before {
  content: '●';
  display: inline-block;
  margin-right: 8px;
  color: var(--tu-clay);
  animation: tu-live-pulse-dot 1.4s ease-in-out infinite;
}

@keyframes tu-live-pulse-dot {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

.tu-live-score__stale {
  font-family: var(--tu-font);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tu-clay);
  background: var(--tu-clay-soft);
  padding: 6px 16px;
  text-align: center;
  border-top: 1px solid var(--tu-clay-mid);
}

/* ════════════════════════════════════════════════════════════════════
 * DESKTOP (>= 768px) — larger type, more breathing room
 * ──────────────────────────────────────────────────────────────────── */

@media (min-width: 768px) {
  .tu-live-score {
    margin: 2em 0;
  }

  .tu-live-score__header {
    padding: 22px 24px 18px;
  }

  /* Desktop: same title-left + status-right shape, with bigger gap + inset */
  .tu-live-score__header { gap: 16px; padding: 20px 32px 16px; }

  .tu-live-score__title-logo    { height: 38px; max-width: 80px; }
  .tu-live-score__title-circuit { font-size: 0.74rem; }
  .tu-live-score__title-round   { font-size: 1.05rem; }
  .tu-live-score__title-qualif  { font-size: 0.62rem; }

  .tu-live-score__sets th {
    /* Mirror the desktop header padding-left so player names line up
       horizontally with the title text. */
    padding: 20px 8px 20px 32px;
    font-size: 1.25rem;
  }

  .tu-live-score__sets:not(.tu-live-score__sets--waiting) {
    border-right: 32px solid var(--tu-board-bg);
  }

  .tu-live-score__sets-row--winner > th::before {
    left: 16px;
    border-top:    6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left:   9px solid var(--tu-board-fg);
  }

  .tu-live-score__sets td {
    padding: 20px 6px;
    width: 50px;
    min-width: 50px;
    font-size: 1.85rem;
  }

  .tu-live-score__sets td.tu-live-score__game-point {
    padding: 8px 8px;
    min-width: 50px;
  }
  .tu-live-score__sets td.tu-live-score__game-point .tu-live-score__cell-digit {
    padding: 6px 12px;
    font-size: 1.35rem;
  }

  .tu-live-score__events {
    padding: 22px 32px 26px;
    gap: 14px;
  }

  .tu-live-score__tournament { padding: 8px 32px; }

  .tu-live-score__event {
    /* widen rail + content padding on desktop */
    padding-left: 84px !important;
    min-height: 100px;
  }

  .tu-live-score__event-time {
    width: 84px;
    padding: 20px 6px 22px;
    font-size: 0.95rem;
    gap: 12px;
  }

  .tu-live-score__event-time::after {
    width: 34px;
    height: 34px;
  }

  .tu-live-score__event-headline {
    padding: 22px 26px 4px;
    font-size: 1.5rem;
  }

  .tu-live-score__event-body {
    padding: 10px 26px 22px;
    font-size: 1.04rem;
    line-height: 1.6;
  }

  .tu-live-score__event:not(:has(.tu-live-score__event-headline)) .tu-live-score__event-body {
    padding: 22px 26px;
  }

  .tu-live-score__event--critical .tu-live-score__event-headline {
    font-size: 1.6rem;
  }

  .tu-live-score__sets--waiting .tu-live-score__waiting-time { font-size: 1.85rem; }
  .tu-live-score__sets--waiting .tu-live-score__waiting-day  { font-size: 0.84rem; }
  .tu-live-score__sets--waiting td.tu-live-score__waiting-cell { padding: 22px 24px; }
}

/* ════════════════════════════════════════════════════════════════════
 * REDUCED MOTION
 * ──────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .tu-live-score *,
  .tu-live-score *::before,
  .tu-live-score *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
