/* SerieAGoal v1.49 | esclusivamente <= 760px.
   Correzione mirata sui selettori effettivi della v1.48.
   Nessuna modifica desktop, API, Premium, pagamenti o markup delle righe.
*/
@media screen and (max-width:760px) {
  /* 1) FORMAZIONI: volti poco piu' grandi in proporzione alla larghezza
     disponibile, senza spostare le coordinate dei calciatori sul campo. */
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-lineup-pitch .sg-lineup-player,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-lineup-pitch .sg-lineup-player.sg-lineup-lines-5,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-lineup-pitch .sg-lineup-player.sg-lineup-lines-6 {
    --sg-v149-face:clamp(40px,11.25vw,46px);
    width:clamp(59px,16.3vw,69px)!important;
    max-width:calc(100% - 2px)!important;
  }
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-lineup-pitch .sg-lineup-player .sg-lineup-face,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-lineup-pitch .sg-lineup-player.sg-lineup-lines-5 .sg-lineup-face,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-lineup-pitch .sg-lineup-player.sg-lineup-lines-6 .sg-lineup-face {
    width:var(--sg-v149-face)!important;height:var(--sg-v149-face)!important;
    flex:0 0 var(--sg-v149-face)!important;
  }
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-lineup-pitch .sg-lineup-player>b.sg44-lineup-name,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-lineup-pitch .sg-lineup-player.sg-lineup-lines-5>b.sg44-lineup-name,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-lineup-pitch .sg-lineup-player.sg-lineup-lines-6>b.sg44-lineup-name {
    max-width:clamp(59px,16.3vw,69px)!important;
  }
  /* L'angolo dei badge segue il nuovo diametro, evitando la sovrapposizione
     tra numero di maglia, voto, nome e foto. */
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-lineup-pitch .sg-lineup-player .sg44-shirt-badge,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-lineup-pitch .sg-lineup-player.sg-lineup-lines-5 .sg44-shirt-badge,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-lineup-pitch .sg-lineup-player.sg-lineup-lines-6 .sg44-shirt-badge {
    top:calc(var(--sg-v149-face) - 13px)!important;right:5px!important;
  }

  /* 2) LISTA PARTITE: status/orario piu' vicino al margine sinistro,
     squadre con distanza regolare. Vale per LIVE, in programma e finite. */
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-main-link,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap.is-finished .sg-match-main-link {
    grid-template-columns:48px minmax(0,1fr)!important;
    column-gap:8px!important;
    padding-left:0!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-main-link > .sg-match-status {
    padding-inline:1px!important;
    justify-content:center!important;
    text-align:center!important;
  }
  /* La sola stellina rimane al centro in verticale, ma viene avvicinata
     al margine destro in modo controllato. Nessuno spazio riservato al grafico. */
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone .sg108-row-actions,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.is-empty .sg108-row-actions,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.has-features .sg108-row-actions {
    transform:translateX(clamp(9px,3.2vw,14px))!important;
    align-items:center!important;
    justify-content:center!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.is-empty,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.has-features {
    overflow:visible!important;
  }
  /* Il bottone statistiche resta nascosto anche dopo il CSS nuovo. */
  html[data-sg-theme] body.sg-body .sg-match-row-wrap a.sg108-stats-cta {display:none!important}

  /* 3) TAB TRASFERIMENTI DELLA SQUADRA: la stessa geometria a due righe
     dell'archivio giocatore. Riga 1: data e nome; riga 2: squadre e freccia.
     Nessuna colonna fissa per loghi e nomi, niente parole spezzate. */
  html[data-sg-theme] body.sg-page-squadre.sg-body .sg-transfer-archive-list > a {
    display:grid!important;
    grid-template-columns:68px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    column-gap:11px!important;
    row-gap:7px!important;
    align-items:center!important;
    padding:12px 14px!important;
    min-width:0!important;
    width:100%!important;
    box-sizing:border-box!important;
  }
  html[data-sg-theme] body.sg-page-squadre.sg-body .sg-transfer-archive-list > a > time {
    grid-column:1!important;grid-row:1!important;
    min-width:0!important;white-space:nowrap!important;
    font-size:11px!important;
  }
  html[data-sg-theme] body.sg-page-squadre.sg-body .sg-transfer-archive-list > a > .sg-transfer-archive-player {
    grid-column:2!important;grid-row:1!important;
    min-width:0!important;
  }
  html[data-sg-theme] body.sg-page-squadre.sg-body .sg-transfer-archive-list > a > .sg-transfer-archive-route {
    grid-column:1/-1!important;grid-row:2!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr)!important;
    align-items:center!important;
    gap:8px!important;
    margin:0!important;padding:3px 0 0!important;
    width:100%!important;min-width:0!important;
  }
  html[data-sg-theme] body.sg-page-squadre.sg-body .sg-transfer-archive-list .sg-transfer-archive-route > span {
    display:flex!important;min-width:0!important;max-width:100%!important;
    align-items:center!important;gap:6px!important;
    white-space:nowrap!important;
  }
  html[data-sg-theme] body.sg-page-squadre.sg-body .sg-transfer-archive-list .sg-transfer-archive-route > span:last-child {
    justify-content:flex-end!important;
  }
  html[data-sg-theme] body.sg-page-squadre.sg-body .sg-transfer-archive-list .sg-transfer-archive-route img {
    display:block!important;flex:0 0 24px!important;
    width:24px!important;height:24px!important;
    max-width:24px!important;object-fit:contain!important;
  }
  html[data-sg-theme] body.sg-page-squadre.sg-body .sg-transfer-archive-list .sg-transfer-archive-route b {
    display:block!important;min-width:0!important;max-width:100%!important;
    font-size:12px!important;line-height:1.3!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  html[data-sg-theme] body.sg-page-squadre.sg-body .sg-transfer-archive-list .sg-transfer-archive-route > i {
    justify-self:center!important;text-align:center!important;
    font-style:normal!important;white-space:nowrap!important;
  }
}
@media screen and (max-width:390px) {
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-main-link,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap.is-finished .sg-match-main-link {
    grid-template-columns:44px minmax(0,1fr)!important;column-gap:7px!important;
  }
  html[data-sg-theme] body.sg-page-squadre.sg-body .sg-transfer-archive-list > a {
    grid-template-columns:60px minmax(0,1fr)!important;column-gap:8px!important;
    padding-inline:10px!important;
  }
  html[data-sg-theme] body.sg-page-squadre.sg-body .sg-transfer-archive-list .sg-transfer-archive-route img {
    flex-basis:21px!important;width:21px!important;height:21px!important;
  }
}


@media screen and (max-width:760px) {
  /* 4) MATCH CENTER > tab Pronostici AI > Analisi gara:
     ripristina un gutter laterale regolare per il blocco analisi e per il
     contenuto dinamico caricato nel dettaglio. Evita testi attaccati al bordo
     sinistro sui telefoni, senza toccare desktop o altri tab. */
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main #sg110-premium-analysis,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-match-predictions-stack {
    box-sizing:border-box!important;
    padding-left:14px!important;
    padding-right:14px!important;
  }
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main #sg110-premium-analysis > h3,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main #sg110-premium-analysis > p,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main #sg110-premium-analysis > .sg95-market-dashboard,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main #sg110-premium-analysis > [data-sg-ai-analysis-detail],
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main #sg110-premium-analysis > [data-sg-ai-analysis-control] {
    margin-left:0!important;
    margin-right:0!important;
  }
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main #sg110-premium-analysis [data-sg-ai-analysis-detail] {
    box-sizing:border-box!important;
    padding-left:0!important;
    padding-right:0!important;
    overflow:hidden!important;
  }
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main #sg110-premium-analysis [data-sg-ai-analysis-detail] > *,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main #sg110-premium-analysis [data-sg-ai-analysis-control] > * {
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
  }
}
@media screen and (max-width:390px) {
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main #sg110-premium-analysis,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-match-predictions-stack {
    padding-left:10px!important;
    padding-right:10px!important;
  }
}
