/* ================================================
   Calendario / Risultati / Classifica
   Stesso sistema visivo di Squadre: canvas scuro,
   font condensato, gradienti cool/warm, ghost element,
   glow magenta on hover. Riusa i token --sport-* condivisi
   (vedi css/style.css :root) così i due sistemi restano
   davvero coerenti, non solo somiglianti.
================================================ */

/* ---- Header: eyebrow + titolo + switcher stagione ---- */
.page-header--calendario {
  position: relative;
  padding-bottom: 34px;
  background:
    radial-gradient(ellipse 900px 420px at 15% -10%, rgba(0,140,253,0.22), transparent 60%),
    radial-gradient(ellipse 700px 380px at 100% 0%, rgba(203,33,104,0.20), transparent 55%),
    var(--c-navy);
}

.cal-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.cal-eyebrow {
  font-family: var(--sport-font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12.5px;
  color: var(--sport-azzurro-dim);
  margin: 0 0 6px;
}

/* ---- Switcher a pillola (stagione + tab sezione) ---- */
.cal-switch-group {
  display: inline-flex;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 11px;
  padding: 3px;
  gap: 2px;
}
.cal-switch-group button {
  border: none; background: none; color: rgba(255,255,255,0.6);
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 8px; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.cal-switch-group button.is-active { background: var(--c-azzurro); color: #fff; }
.cal-switch-group button:hover:not(.is-active) { color: #fff; }
.cal-switch-group button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---- Zona scura (tutto il corpo della pagina) ---- */
.cal-dark-zone { background: var(--sport-navy-deep); padding-bottom: 8px; }

.cal-tabs-row { padding: 22px 0 0; }

/* ---- Tab categoria: scroll orizzontale su schermi piccoli ---- */
.cal-switch-group--cat { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.cal-switch-group--cat::-webkit-scrollbar { display: none; }

/* ---- Pannello categoria: calendario+risultati a sinistra, classifica a destra ---- */
.cal-cat-panel.is-hidden { display: none; }

.cal-section-block { padding: 32px 0 8px; }

.cal-section-title { font-family: var(--font-heading); font-weight: 800; font-size: 22px; margin: 0 0 4px; color: #fff; }

.cal-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.cal-section-head .cal-section-title { margin: 0; }

.cal-jump-btn {
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  color: var(--c-azzurro); background: rgba(0,140,253,0.12); border: 1px solid rgba(0,140,253,0.3);
  padding: 7px 14px; border-radius: 99px; cursor: pointer; white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.cal-jump-btn:hover { background: var(--c-azzurro); color: #fff; }

/* Senza classifica (categoria non ancora censita nel girone): una sola colonna */
.cal-col-right.is-hidden { display: none; }

/* Con classifica: due colonne, calendario/risultati scorrono a sinistra
   mentre la classifica resta visibile a destra (sticky). */
.cal-cols--split {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 8px 32px;
  align-items: start;
}
.cal-cols--split .cal-col-right {
  position: sticky;
  top: 20px;
  padding-top: 32px;
}

@media (max-width: 900px) {
  .cal-cols--split { grid-template-columns: 1fr; }
  .cal-cols--split .cal-col-right { position: static; top: auto; }
}

/* ---- Lista fixture (partita) — righe compatte, stile "prossime partite" ---- */
.fixture-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 2px 8px;
}

.fixture-list-empty {
  text-align: center;
  color: rgba(255,255,255,0.45);
  padding: 40px 24px;
}

.fixture-row {
  position: relative;
  border-radius: 12px;
  padding: 13px 16px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 3px solid var(--sport-azzurro-dim);
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.fixture-row.warm { border-left-color: var(--sport-magenta-dim); }

@media (hover: hover) {
  .fixture-row:hover {
    background: rgba(255,255,255,0.06);
    transform: translateX(3px);
  }
}

/* La prossima partita in calendario si distingue dal resto della lista */
.fixture-row--next {
  border-left-width: 3px;
  background: linear-gradient(120deg, rgba(0,140,253,0.14), rgba(255,255,255,0.03) 55%);
  border-color: rgba(0,140,253,0.35);
  padding-top: 30px;
}

.fixture-row-next-badge {
  position: absolute; top: 10px; left: 16px;
  font-family: var(--sport-font-display); font-weight: 800; font-size: 9.5px;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--c-azzurro);
}

.fixture-row-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}

.fixture-row-date {
  font-family: var(--sport-font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 0.03em; text-transform: uppercase; color: rgba(255,255,255,0.5);
}

.fixture-teams { display: flex; flex-direction: column; gap: 6px; }

.fixture-team { display: flex; align-items: center; gap: 9px; min-width: 0; }

.fixture-team-logo {
  width: 22px; height: 22px; border-radius: 5px; object-fit: contain;
  background: rgba(255,255,255,0.92); padding: 2px; flex-shrink: 0;
}
.fixture-team-logo-init {
  width: 22px; height: 22px; border-radius: 5px; flex-shrink: 0;
  background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center;
  font-family: var(--sport-font-display); font-weight: 800; font-size: 11px; color: rgba(255,255,255,0.55);
}

.fixture-team-name {
  flex: 1;
  font-family: var(--font-body); font-weight: 600; font-size: 14px; color: rgba(255,255,255,0.55);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.fixture-team--vv .fixture-team-name { color: #fff; }
.fixture-team-name strong { font-weight: 800; color: #fff; }

.fixture-row-score {
  flex-shrink: 0; width: 24px; text-align: center;
  font-family: var(--sport-font-display); font-weight: 800; font-size: 16px; color: #fff;
}
.fixture-row-score--vittoria { color: #5fd97a; }
.fixture-row-score--sconfitta { color: var(--sport-magenta-dim); }

.fixture-row-venue {
  display: flex; align-items: center; gap: 5px; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11.5px; color: rgba(255,255,255,0.4);
  padding-top: 8px; margin-top: 1px; border-top: 1px solid rgba(255,255,255,0.07);
}
.fixture-row-venue svg { flex-shrink: 0; }

@media (prefers-reduced-motion: reduce) {
  .fixture-row { transition: none !important; }
}

/* ---- Classifica (pannello scuro) ---- */
.stand-panel {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  overflow: hidden;
}
.stand-head { padding: 18px 22px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.stand-title { font-family: var(--sport-font-display); font-weight: 800; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; }
.stand-sub { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 3px; }

.stand-table { width: 100%; border-collapse: collapse; }
.stand-table thead th {
  text-align: left; font-family: var(--sport-font-display); font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.35); padding: 12px 22px;
}
.stand-table thead th.stand-stat, .stand-table thead th.stand-pos { text-align: center; }
.stand-table td { padding: 12px 22px; border-top: 1px solid rgba(255,255,255,0.06); vertical-align: middle; color: #fff; font-size: 14px; }
.stand-table tbody tr:first-child td { border-top: none; }

.stand-pos  { text-align: center; width: 28px; color: rgba(255,255,255,0.4); font-size: 11px; }
.stand-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.stand-stat { text-align: center; width: 32px; color: rgba(255,255,255,0.55); }
.stand-pts  { text-align: center; width: 40px; font-weight: 800; color: #fff; }

.stand-logo      { width: 22px; height: 22px; border-radius: 5px; object-fit: contain; background: rgba(255,255,255,0.92); padding: 2px; flex-shrink: 0; }
.stand-logo-init { width: 22px; height: 22px; border-radius: 5px; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.5); flex-shrink: 0; }

.stand-row--vv td          { background: rgba(0,140,253,0.08); }
.stand-row--vv .stand-name { color: var(--sport-azzurro-dim); font-weight: 800; }
.stand-row--vv .stand-pts  { color: var(--sport-azzurro-dim); }

.stand-footer { padding: 12px 22px; font-size: 11px; color: rgba(255,255,255,0.3); border-top: 1px solid rgba(255,255,255,0.08); }

.stand-empty { text-align: center; color: rgba(255,255,255,0.5); padding: 48px 24px; }

@media (max-width: 600px) {
  .cal-head-row { align-items: flex-start; }
  .stand-table thead th, .stand-table td { padding: 10px 14px; }
}
