/* =============== HEADER + WRAP =============== */
.psss__head{
  background:#0b1a3a;color:#fff;padding:12px 14px;border-radius:10px 10px 0 0;
  display:flex;justify-content:space-between;align-items:center
}
.psss__title{font-weight:800;letter-spacing:.02em}
.psss__season{opacity:.9;font-weight:600}
.psss__wrap{
  background:#fff;border:1px solid #e5e7ef;border-top:none;border-radius:0 0 10px 10px;
  box-sizing:border-box;width:100%;margin:0;
}
.psss__wrap *, .psss-ticker *{box-sizing:border-box}

/* =============== TABELLA CLASSIFICA =============== */
.psss__table{width:100%;border-collapse:separate;border-spacing:0;table-layout:auto}
.psss__table thead th{
  position:sticky;top:0;background:var(--psss-table-head,#fff);z-index:2;
  padding:10px 8px;border-bottom:1px solid #e5e7ef;text-align:center;white-space:nowrap
}
.psss__table thead th.team{text-align:left}
.psss__table tbody td{
  padding:10px 8px;border-bottom:1px solid #e5e7ef;text-align:center;vertical-align:middle
}
.psss__table tbody td.team{display:flex;align-items:center;gap:.55rem;justify-content:flex-start}
.psss__table tbody tr:nth-child(even){background:var(--psss-table-alt,#f6f7fb)}
.psss__table img.logo{width:22px;height:22px;border-radius:999px;object-fit:cover}

/* --- MOBILE: nascondi GF, GS, DR (colonne 8-10) per fermarti a P --- */
@media (max-width: 640px){
  .psss__table thead th:nth-child(8),
  .psss__table thead th:nth-child(9),
  .psss__table thead th:nth-child(10),
  .psss__table tbody td:nth-child(8),
  .psss__table tbody td:nth-child(9),
  .psss__table tbody td:nth-child(10){display:none}
  .psss__table tbody td{padding:10px 6px}
  .psss__table img.logo{width:20px;height:20px}
}

/* =============== PARTITE (ROUND) =============== */
.psss--round .psss__matches{display:flex;flex-direction:column;gap:10px;padding:12px}
.psss--round .psss__matches .psss-match__row{
  display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center;
  padding:10px 12px;border:1px solid #e5e7ef;border-radius:10px;background:var(--psss-match-bg,#fff)
}
.psss--round .psss__matches .psss-match__row .team{display:flex;align-items:center;gap:.5rem}
.psss--round .psss__matches .psss-match__row .team .logo{width:24px;height:24px;border-radius:999px;object-fit:cover}
.psss--round .psss__matches .psss-match__row .team:first-child{justify-self:start}
.psss--round .psss__matches .psss-match__row .team:last-child{justify-self:end}
.psss--round .psss__matches .psss-match__row .score{justify-self:center;text-align:center;min-width:64px;font-weight:800}
@supports not (display: grid){
  .psss--round .psss__matches .psss-match__row{display:flex;justify-content:space-between;align-items:center}
  .psss--round .psss__matches .psss-match__row .score{margin:0 auto}
}

/* =============== TICKER =============== */
.psss-ticker{
  position:relative;background:var(--psss-ticker-bg,#0b1a3a);color:var(--psss-ticker-text,#fff);
  border-radius:8px;padding:8px;font-size:calc(1rem * var(--psss-zoom,1));
}
.psss-ticker__title{font-weight:800;margin:0 0 6px 2px}

/* viewport + slide */
.psss-ticker__viewport{overflow:hidden;position:relative;white-space:nowrap}
.psss-ticker__slide{display:block;padding:4px 0}
.psss-ticker__lane{display:flex;gap:18px;align-items:center}

/* marquee wrapper (single slide) */
.psss-marquee-wrap{will-change:transform;display:flex;align-items:center;gap:18px}

/* chip */
.psss-chip{display:flex;align-items:center;gap:8px}
.psss-chip .tm{display:flex;align-items:center;gap:6px}
.psss-chip .logo{width:22px;height:22px;border-radius:999px;object-fit:cover}
.psss-chip .name{font-weight:600}
.psss-chip .dash{font-weight:700;min-width:38px;text-align:center}

/* nav/controls */
.psss-ticker__nav{
  position:absolute;top:50%;transform:translateY(-50%);
  background:rgba(255,255,255,.12);border:0;border-radius:6px;width:28px;height:28px;
  line-height:28px;text-align:center;color:#fff;cursor:pointer
}
.psss-ticker__nav.prev{left:6px}
.psss-ticker__nav.next{right:6px}
.psss-ticker__controls{position:absolute;right:8px;top:8px;display:flex;gap:6px;z-index:5}
.psss-ticker__controls .psss-ctl{background:rgba(255,255,255,.14);border:0;border-radius:6px;padding:2px 6px;cursor:pointer;color:#fff}

/* --- MOBILE: solo loghi se attivo logoonly (classe togglata via JS) --- */
@media (max-width: 640px){
  .psss-ticker.psss-ticker--logos-only .psss-chip .name{display:none}
}

/* ======== FIX FINALI MOBILE (risultati + classifica) ======== */
@media (max-width: 640px){
  /* Evita scroll orizzontale dentro i blocchi */
  .psss__wrap{overflow-x:hidden}

  /* --- PARTITE (ROUND) --- */
  .psss--round .psss__matches{padding:10px}
  .psss--round .psss__matches .psss-match__row{
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    gap:8px; padding:10px 12px;
  }
  .psss--round .psss__matches .psss-match__row .team .logo{width:22px;height:22px}
  .psss--round .psss__matches .psss-match__row .team .name{
    font-weight:600; line-height:1.1;
    max-width: 120px;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  .psss--round .psss__matches .psss-match__row .score{
    min-width:52px; font-weight:800; text-align:center;
  }

  /* --- TABELLA --- */
  .psss__table{font-size:0.98rem}
  .psss__table thead th,
  .psss__table tbody td{padding:10px 6px}

  /* prima colonna (#) stretta e centrata */
  .psss__table thead th.pos,
  .psss__table tbody td.pos{width: 2.5ch; text-align:center}

  /* colonna squadra: logo + nome con ellissi */
  .psss__table tbody td.team{gap:.5rem}
  .psss__table tbody td.team span{
    display:inline-block; max-width: 56vw;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }

  /* colonne numeriche (Pt, G, V, N, P) allineate e compatte */
  .psss__table thead th:nth-child(3),
  .psss__table thead th:nth-child(4),
  .psss__table thead th:nth-child(5),
  .psss__table thead th:nth-child(6),
  .psss__table thead th:nth-child(7),
  .psss__table tbody td:nth-child(3),
  .psss__table tbody td:nth-child(4),
  .psss__table tbody td:nth-child(5),
  .psss__table tbody td:nth-child(6),
  .psss__table tbody td:nth-child(7){
    width: 3.2ch; text-align:center;
  }

  /* (già nascosti con le regole precedenti) GF/GS/DR restano hidden */
}

/* Piccola rifinitura desktop: allineamenti più puliti */
@media (min-width: 641px){
  .psss--round .psss__matches .psss-match__row .team .name{white-space:nowrap}
  .psss__table thead th, .psss__table tbody td{vertical-align:middle}
}
