/*
 * ╔══════════════════════════════════════════════════════════════╗
 * ║  style.css — Stili del widget campionato Tiki Taka          ║
 * ╚══════════════════════════════════════════════════════════════╝
 *
 * Struttura del file:
 *  1. Import font Google
 *  2. Design tokens (variabili CSS per colori, raggi, font)
 *  3. Tema chiaro (override delle variabili)
 *  4. Reset base e body
 *  5. Hero (header grande in index.php)
 *  6. Page container e section label
 *  7. Match card (scheda partita)
 *  8. Standings (classifica)
 *  9. Calendar list (lista calendario)
 * 10. Results list (lista risultati)
 * 11. Grid, Tab, Legend
 * 12. Icone, countdown, pulsante calendario, grafico punti
 * 13. Responsive (mobile)
 */

/*
 * Carico i font da Google Fonts.
 * Barlow → font principale per testo normale
 * Barlow Condensed → font compresso per numeri e titoli
 * wght@400;500;600;700 → i "pesi" (spessori) del font da caricare
 */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=Barlow+Condensed:wght@500;600;700&display=swap');

/*
 * ── DESIGN TOKENS (variabili CSS) ────────────────────────────
 * Le variabili CSS (custom properties) si definiscono con --nome
 * e si usano con var(--nome). Il vantaggio è che basta cambiarle
 * qui per aggiornare tutto il sito.
 *
 * :root → si applica all'elemento radice (html), quindi è globale.
 */
:root {
  --bg:        #0b0c10;
  --surface:   #13141a;
  --card:      #1a1b23;
  --card-h:    #1f2029;
  --border:    rgba(255,255,255,0.07);
  --border-md: rgba(255,255,255,0.12);
  --text:      #e8e8e0;
  --muted:     #7a7a88;
  --hint:      #4a4a56;
  /* Colori del logo Pallavolo Staranzano: viola → magenta, anello rosso */
  --accent:    #a98bff;
  --accent2:   #e46cc4;
  --brand-red: #ef4444;
  --brand-grad: linear-gradient(90deg, #6d3fe0, #c02a9b 60%, #e1282d);
  --win:       #35b96a;
  --loss:      #e05a5a;
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --font:      'Barlow', system-ui, sans-serif;
  --font-cond: 'Barlow Condensed', system-ui, sans-serif;
}

/*
 * ── TEMA CHIARO (override) ────────────────────────────────────
 * Quando l'elemento <html> ha l'attributo data-theme="light",
 * queste variabili SOVRASCRIVONO quelle del tema scuro definite sopra.
 * Il selettore [data-theme="light"] è più specifico di :root,
 * quindi ha la precedenza.
 *
 * Il tema viene impostato via JavaScript (vedi embed.php).
 */
[data-theme="light"] {
  --bg:        #f0f2f5;
  --surface:   #ffffff;
  --card:      #ffffff;
  --card-h:    #f4f6f9;
  --border:    rgba(0,0,0,0.08);
  --border-md: rgba(0,0,0,0.14);
  --text:      #1a1b23;
  --muted:     #6b7280;
  --hint:      #9ca3af;
  --accent:    #5b2fc9;
  --accent2:   #a8238a;
  --brand-red: #d61f26;
  --win:       #15803d;
  --loss:      #c81e1e;
}

/* Anello visibile quando si naviga con la tastiera (accessibilità) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/*
 * Reset universale: rimuove margini e padding da tutti gli elementi.
 * box-sizing: border-box → il padding e il bordo sono inclusi nella larghezza dichiarata
 * (senza questo, un elemento con width:100px e padding:10px diventerebbe largo 120px).
 * *::before e *::after → si applica anche agli pseudo-elementi CSS.
 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ── Hero ────────────────────────────────────────── */
.vb-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 28px 24px 22px;
  position: relative;
  overflow: hidden;
}

.vb-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(212,168,67,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.vb-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
}

.vb-hero-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.vb-hero-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.vb-icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--card);
  border: 0.5px solid var(--border-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 17px;
  color: var(--muted);
  transition: color .15s, background .15s;
  text-decoration: none;
  user-select: none;
  flex-shrink: 0;
  padding: 0;
  font-family: inherit;
}

.vb-icon-btn:hover {
  color: var(--text);
  background: var(--card-h);
}

.vb-hero-logo-img {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: contain;
  background: #fff;
  flex-shrink: 0;
}

.vb-hero-info h1 {
  font-family: var(--font-cond);
  font-size: 26px; font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.vb-hero-info p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.vb-hero-stats {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.vb-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.vb-stat-num {
  font-family: var(--font-cond);
  font-size: 24px; font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.vb-stat-lbl {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.vb-hero-divider {
  width: 1px; height: 32px;
  background: var(--border-md);
}

/*
 * ── CONTENITORE PAGINA ───────────────────────────────────────
 * Limita la larghezza del contenuto a 860px e lo centra.
 * margin: 0 auto → con larghezza fissa, centra orizzontalmente.
 * padding → spazio interno in basso e ai lati.
 */
.vb-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* ── Section label ───────────────────────────────── */
.vb-section-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  margin: 28px 0 12px;
  opacity: 0.7;
}

/*
 * ── SCHEDA PARTITA ───────────────────────────────────────────
 * Il componente principale: mostra squadre, punteggio e dettagli.
 * Struttura HTML:
 *   .vb-match
 *     .vb-match-head  (data + badge vittoria/sconfitta)
 *     .vb-match-body  (squadra casa | punteggio | squadra ospite)
 *     .vb-sets        (chip con punteggi dei singoli set)
 *     .vb-match-foot  (numero gara)
 */
/* ── Match card ──────────────────────────────────── */
.vb-match {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 10px;
  transition: border-color .15s;
}

.vb-match:hover { border-color: var(--border-md); }

/* Striscia colorata a sinistra: verde se vinta, rossa se persa */
.vb-match.is-win  { box-shadow: inset 4px 0 0 var(--win); }
.vb-match.is-loss { box-shadow: inset 4px 0 0 var(--loss); }

.vb-match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 0.5px solid var(--border);
}

.vb-match-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Badges */
.vb-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.vb-badge.played {
  background: rgba(120,120,130,0.12);
  color: var(--muted);
  border: 0.5px solid var(--border);
}

.vb-badge.upcoming {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  border: 0.5px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.vb-badge.win {
  background: rgba(53,185,106,0.15);
  color: var(--win);
  border: 0.5px solid rgba(53,185,106,0.3);
}

.vb-badge.loss {
  background: rgba(201,79,79,0.13);
  color: #e07070;
  border: 0.5px solid rgba(201,79,79,0.25);
}

/* Match body */
.vb-match-body {
  display: grid;
  grid-template-columns: 1fr 88px 1fr;
  align-items: center;
  padding: 16px 14px;
  gap: 6px;
}

.vb-team { display: flex; flex-direction: column; gap: 5px; }
.vb-team.away { align-items: flex-end; text-align: right; }

.vb-team-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 0.5px solid var(--border-md);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-cond);
  font-size: 12px; font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

.vb-team-icon.home-icon {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: #fff;
  overflow: hidden;
}

.vb-team-icon img { width: 100%; height: 100%; object-fit: cover; }

/* Etichetta "Casa" / "Trasferta" */
.vb-pill {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 20px;
  margin-right: 4px;
  vertical-align: 1px;
}
.vb-pill.home { color: #fff; background: var(--accent); }
.vb-pill.away { color: var(--muted); border: 1px solid var(--border-md); }
.vb-team .vb-pill { align-self: flex-start; margin: 0; }
.vb-team.away .vb-pill { align-self: flex-end; }

.vb-team-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.vb-team-name.winner { color: var(--win); }
.vb-team-name.loser  { color: var(--loss); }

.vb-team-place {
  font-size: 11px;
  color: var(--muted);
}

.vb-home-label {
  color: var(--accent) !important;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.vb-away-label {
  font-size: 10px !important;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Score center */
.vb-score {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.vb-score-main {
  font-family: var(--font-cond);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1;
}

.vb-score-vs {
  font-family: var(--font-cond);
  font-size: 20px;
  font-weight: 600;
  color: var(--hint);
  letter-spacing: 0.04em;
}

.vb-score-time {
  font-size: 13px;
  color: var(--muted);
}

.vb-score-label {
  font-size: 10px;
  color: var(--hint);
  letter-spacing: 0.06em;
}

/* Set chips */
.vb-sets {
  display: flex;
  gap: 5px;
  padding: 10px 14px;
  border-top: 0.5px solid var(--border);
  flex-wrap: wrap;
}

.vb-set-chip {
  flex: 1;
  min-width: 54px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  text-align: center;
}

.vb-set-lbl {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--hint);
  margin-bottom: 3px;
}

.vb-set-score {
  font-family: var(--font-cond);
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}

.vb-set-score .w { color: var(--text); }

.vb-set-chip.win {
  border-color: rgba(53,185,106,0.35);
  background: rgba(53,185,106,0.07);
}
.vb-set-chip.win .vb-set-score { color: var(--win); }

.vb-set-chip.loss {
  border-color: rgba(201,79,79,0.3);
  background: rgba(201,79,79,0.06);
}
.vb-set-chip.loss .vb-set-score { color: var(--loss); }

/* Match footer */
.vb-match-foot {
  padding: 8px 14px;
  border-top: 0.5px solid var(--border);
  font-size: 11px;
  color: var(--hint);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Standings ───────────────────────────────────── */
.vb-standings {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 10px;
}

.vb-standings-head {
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vb-standings-title {
  font-family: var(--font-cond);
  font-size: 14px; font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.vb-standings-sub {
  font-size: 11px;
  color: var(--muted);
}

.vb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.vb-table th {
  padding: 8px 10px;
  font-size: 9px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hint);
  text-align: center;
  border-bottom: 0.5px solid var(--border);
}

.vb-table th.tl { text-align: left; }

.vb-table td {
  padding: 9px 10px;
  text-align: center;
  color: var(--muted);
  border-bottom: 0.5px solid var(--border);
}

.vb-table td.tl { text-align: left; }
.vb-table tr:last-child td { border-bottom: none; }

/*
 * Su mobile la tabella scorre in orizzontale dentro .vb-table-wrap,
 * mentre posizione e squadra restano fisse a sinistra (position: sticky).
 * Le celle fisse devono avere uno sfondo pieno, quindi la tinta della
 * riga (--tint) è disegnata come gradiente sopra al colore della card.
 */
.vb-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.vb-table tbody th {
  padding: 9px 10px;
  font-size: 13px; font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.vb-table tbody td,
.vb-table tbody th {
  background: linear-gradient(var(--tint, transparent), var(--tint, transparent)), var(--card);
}

.vb-table thead th { background: var(--card); }

.vb-table .sticky-pos  { position: sticky; left: 0; z-index: 1; width: 34px; min-width: 34px; }
.vb-table .sticky-team { position: sticky; left: 34px; z-index: 1; min-width: 170px; box-shadow: 1px 0 0 var(--border); }

.vb-table tr:hover { --tint: var(--card-h); }

.vb-table tr.highlight { --tint: color-mix(in srgb, var(--accent) 13%, transparent); }
.vb-table tr.highlight .vb-pos,
.vb-table tr.highlight .vb-pts { color: var(--accent); }

.vb-table tr.top3 td { background: rgba(212,168,67,0.04); }
.vb-table tr.top3 .vb-pos { color: var(--accent); }

[data-theme="light"] .vb-table tr.top3 td { background: rgba(21,101,192,0.04); }

.vb-table tr.promotion { --tint: color-mix(in srgb, var(--win) 9%, transparent); }
.vb-table tr.promotion .vb-pos { color: var(--win); }

.vb-table tr.relegation { --tint: color-mix(in srgb, var(--loss) 9%, transparent); }
.vb-table tr.relegation .vb-pos { color: var(--loss); }

.vb-pos {
  font-family: var(--font-cond);
  font-size: 14px; font-weight: 700;
  color: var(--muted);
}

.vb-team-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.vb-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface);
  border: 0.5px solid var(--border-md);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-cond);
  font-size: 9px; font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

.vb-dot.me {
  border-color: var(--accent);
  color: var(--accent);
}

.vb-team-cell-name {
  font-size: 13px; font-weight: 500;
  color: var(--text);
}

.vb-me-name { font-weight: 700; }

.vb-pts {
  font-family: var(--font-cond);
  font-size: 16px; font-weight: 700;
  color: var(--text);
}

/* Form dots */
.vb-form {
  display: flex;
  gap: 3px;
  justify-content: center;
  align-items: center;
}

.vb-fd {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vb-fw { background: var(--win); }
.vb-fl { background: rgba(200, 80, 80, 0.55); }

/* ── Calendar list ───────────────────────────────── */
.vb-cal {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 10px;
}

.vb-cal-head {
  padding: 11px 16px;
  border-bottom: 0.5px solid var(--border);
  font-family: var(--font-cond);
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vb-cal-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 14px;
  border-bottom: 0.5px solid var(--border);
  transition: background .12s;
}

.vb-cal-row:last-child { border-bottom: none; }
.vb-cal-row:hover { background: var(--card-h); }

.vb-cal-date {
  min-width: 38px;
  text-align: center;
}

.vb-cal-day {
  font-family: var(--font-cond);
  font-size: 22px; font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.vb-cal-mon {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.vb-cal-divider {
  width: 1px; height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

.vb-cal-info { flex: 1; min-width: 0; }

.vb-cal-teams {
  font-size: 13px; font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vb-cal-comp {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.vb-cal-time {
  font-family: var(--font-cond);
  font-size: 14px; font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.vb-cal-home {
  color: var(--accent);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.04em;
}

.vb-cal-count { font-size: 11px; font-weight: 400; color: var(--muted); }

.vb-cal-row.is-played .vb-cal-day { color: var(--muted); }

/* Risultato a destra nelle righe già giocate: punteggio + pallini set */
.vb-cal-result {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.vb-cal-result .vb-results-score { padding-left: 0; }

/* Messaggi di servizio */
.vb-empty  { color: var(--muted); font-size: 13px; padding: 12px 0; }
.vb-source { color: var(--hint); font-size: 11px; text-align: center; margin-top: 20px; }
.vb-stale {
  margin: 12px 0 0;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--border-md);
  border-radius: var(--radius);
  text-align: center;
}

/*
 * ── GRIGLIA A 2 COLONNE ──────────────────────────────────────
 * CSS Grid divide il contenuto in 2 colonne.
 * grid-template-columns: 1.2fr 1fr → la prima colonna è leggermente più larga.
 * "fr" = "fraction" (frazione dello spazio disponibile).
 * La variante .equal divide 50% e 50%.
 */
/* ── Grid ────────────────────────────────────────── */
.vb-grid2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

.vb-grid2.equal {
  grid-template-columns: 1fr 1fr;
}

/*
 * ── SISTEMA DI TAB ───────────────────────────────────────────
 * I tab sono pulsanti testuali nella barra di navigazione.
 * Il tab attivo ha una linea colorata sotto (border-bottom).
 *
 * .tab-panel { display: none } → i pannelli sono nascosti di default
 * .tab-panel.active { display: block } → solo quello attivo è visibile
 *
 * Il cambio di tab è gestito dal JavaScript in embed.php.
 */
/* ── Tabs ────────────────────────────────────────── */
.vb-tabs {
  display: flex;
  justify-content: safe center; /* safe: se le tab non ci stanno partono da sinistra e si scorrono, invece di tagliarsi */
  gap: 2px;
  padding: 16px 0 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  margin-bottom: 4px;
  scrollbar-width: none;
}

.vb-tabs::-webkit-scrollbar {
  display: none;
}

.vb-tab {
  padding: 8px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  user-select: none;
  margin-bottom: -1px;
}

.vb-tab:hover { color: var(--text); }

.vb-tab.active {
  color: var(--accent);
  border-image: var(--brand-grad) 1;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Standings legend ────────────────────────────── */
.vb-legend {
  display: flex;
  gap: 16px;
  padding: 10px 14px;
  border-top: 0.5px solid var(--border);
  flex-wrap: wrap;
}

.vb-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}

.vb-legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Compact results list ────────────────────────── */
.vb-results-list {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.vb-results-head {
  padding: 11px 16px;
  border-bottom: 0.5px solid var(--border);
  font-family: var(--font-cond);
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vb-results-row {
  display: grid;
  grid-template-columns: 60px 26px 1fr auto auto;
  align-items: center;
  padding: 9px 16px;
  gap: 12px;
  border-bottom: 0.5px solid var(--border);
  transition: background .12s;
}

.vb-results-dots {
  display: flex;
  gap: 3px;
  align-items: center;
  flex-shrink: 0;
}

.vb-results-row:last-child { border-bottom: none; }
.vb-results-row:hover { background: var(--card-h); }

.vb-results-date {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.vb-results-round {
  font-family: var(--font-cond);
  font-size: 12px; font-weight: 700;
  color: var(--hint);
  text-align: center;
}

.vb-results-match {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.3;
}

.vb-results-match strong {
  color: var(--text);
  font-weight: 600;
}

.vb-results-score {
  font-family: var(--font-cond);
  font-size: 17px; font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  text-align: right;
  padding-left: 10px;
}

.vb-results-score.win  { color: var(--win); }
.vb-results-score.loss { color: var(--loss); }

/*
 * ── ICONE, COUNTDOWN, CALENDARIO, GRAFICO ────────────────────
 * Le icone Lucide sono SVG inline con stroke="currentColor":
 * prendono il colore del testo, quindi funzionano in entrambi i temi.
 */
.vb-ico { display: inline-block; vertical-align: -2px; flex-shrink: 0; }
.vb-pill .vb-ico,
.vb-badge .vb-ico { margin-right: 3px; vertical-align: -1px; }

/* Countdown nel piede della card "Prossima gara" */
.vb-countdown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--accent);
}
.vb-countdown.is-live { color: var(--loss); }

/* Pulsante "Aggiungi al calendario" */
.vb-cal-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 20px;
  transition: background .15s;
}
.vb-cal-btn:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }

/* Grafico andamento punti (SVG generato in PHP) */
.vb-chart {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 10px;
}
.vb-chart .vb-standings-title { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.vb-chart svg { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; padding: 8px 4px; }
.vb-chart-grid { stroke: var(--border-md); stroke-width: 1; }
.vb-chart-area { fill: var(--accent); opacity: .12; }
.vb-chart-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.vb-chart-dot  { fill: var(--card); stroke: var(--accent); stroke-width: 2; }
/* Font in unità del viewBox: su mobile l'SVG si rimpicciolisce (~0.8×), quindi parto più grande */
.vb-chart-axis { fill: var(--muted); font-family: var(--font); font-size: 13px; }
.vb-chart-val  { fill: var(--text); font-family: var(--font-cond); font-size: 15px; font-weight: 700; }

/*
 * ── RESPONSIVE (adattamento mobile) ─────────────────────────
 * @media (max-width: 700px) → queste regole si applicano SOLO
 * quando la finestra è larga 700px o meno (smartphone/tablet).
 *
 * Su mobile: riduco font, logo più piccolo, griglia a 1 colonna.
 * La griglia a 2 colonne (.vb-grid2) diventa 1 colonna unica.
 */
/* ── Responsive ──────────────────────────────────── */
@media (max-width: 700px) {
  .vb-hero { padding: 20px 16px; }
  .vb-hero-info h1 { font-size: 20px; }
  .vb-hero-logo-img { width: 52px; height: 52px; }
  .vb-hero-stats { gap: 14px; }
  .vb-stat-num { font-size: 20px; }

  .vb-match-body { grid-template-columns: 1fr 72px 1fr; }
  .vb-score-main { font-size: 26px; }

  .vb-grid2,
  .vb-grid2.equal { grid-template-columns: 1fr; }

  .vb-results-row { grid-template-columns: 52px 22px 1fr auto auto; gap: 8px; }
}
