/* ==============================================================
   Stagione: roster, classifiche e risultati (Serie B e Giovanili)
================================================================= */

/* ---------- Roster a griglia: sempre allineato, su ogni schermo ---------- */
.rosterTitolo { margin: 2.5rem 0 1rem; text-align: center; text-transform: uppercase; letter-spacing: .05em; }
.roster {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 16px;
	margin: 0;
}
@media only screen and (max-width: 400px) {
	.roster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.giocatore {
	display: flex; flex-direction: column; align-items: center; text-align: center;
	border: 1px solid #e8e8e8; padding: 0 0 14px; background: #fff;
}
.giocatore img {
	width: 100%; height: auto; aspect-ratio: 400 / 556; object-fit: cover; object-position: top;
	background: #f0f0f0; margin-bottom: 10px;
}
.giocatoreNome { font-weight: 700; font-size: 15px; line-height: 1.3; padding: 0 8px; color: #151618; }
.giocatoreNome .numero { display: block; font-size: 13px; color: #1C4596; letter-spacing: .05em; }
.giocatoreRuolo { font-size: 13px; color: #555; margin-top: 4px; padding: 0 8px; }

/* ---------- Riepilogo stagione ---------- */
.stagione h4, .categoria h4 { margin: 2.5rem 0 .8rem; text-transform: uppercase; letter-spacing: .04em; font-size: 1.1rem; }
.numeriStagione {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
	margin: 1.5rem 0 0; text-align: center;
}
.numeriStagione li { border: 1px solid #e8e8e8; padding: 14px 6px; }
.numeriStagione strong { display: block; font-size: 1.8rem; line-height: 1.1; color: #151618; }
.numeriStagione span { font-size: 13px; color: #555; }

/* ---------- Classifica ---------- */
.classificaBox { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.classifica { width: 100%; border-collapse: collapse; margin: 0 0 .5rem; font-size: 15px; }
.classifica caption { text-align: left; font-size: 13px; color: #555; padding: 0 0 6px; }
.classifica th, .classifica td { padding: 9px 8px; text-align: right; border-bottom: 1px solid #e8e8e8; white-space: nowrap; }
.classifica th { font-size: 12px; text-transform: uppercase; color: #555; background: #f8f8f8; }
.classifica th:first-child, .classifica td:first-child { text-align: center; width: 2.2em; color: #555; }
.classifica .squadra { text-align: left; white-space: normal; width: 100%; }
.classifica tbody tr:nth-child(even) { background: #fbfbfb; }
.classifica tr.ponte { background: #e9eef8 !important; font-weight: 700; }
.classifica tr.ponte td:first-child { color: #1C4596; box-shadow: inset 4px 0 0 #1C4596; }

/* ---------- Risultati ---------- */
.fase { border: 1px solid #e8e8e8; margin: 0 0 12px; background: #fff; }
.fase > summary {
	cursor: pointer; padding: 14px 16px; font-weight: 700; list-style-position: inside;
	background: #f8f8f8; min-height: 48px; box-sizing: border-box;
}
.fase[open] > summary { border-bottom: 1px solid #e8e8e8; }
.partite { margin: 0; }
.partita {
	display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center;
	padding: 10px 16px; border-bottom: 1px solid #f0f0f0;
}
.partita:last-child { border-bottom: 0; }
.esito {
	width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 14px;
}
.esitoV { background: #1C4596; color: #fff; }
.esitoP { background: #e3e3e3; color: #333; }
.esitoN { background: #fff; color: #888; border: 1px dashed #ccc; }
.partitaInfo { display: flex; flex-direction: column; min-width: 0; }
.partitaInfo strong { font-size: 15px; line-height: 1.3; }
.partitaInfo small { font-size: 13px; color: #666; line-height: 1.4; }
.punteggio { font-weight: 700; font-size: 18px; white-space: nowrap; }
.punteggio.nonGiocata { font-weight: 400; font-size: 13px; color: #888; }
.fonteDati { font-size: 13px; color: #666; margin-top: 1rem; }

/* ---------- Pagina giovanili ---------- */
.titoloPagina { padding: 50px 0 30px; text-align: center; }
.categoria { padding-top: 10px; }
.categoria + .categoria { border-top: 1px solid #e8e8e8; margin-top: 30px; padding-top: 30px; }
.categoria h3 { margin-bottom: .3rem; }
.categoriaNota { color: #555; font-size: 15px; margin-bottom: 1rem; }
.categoria .numeriStagione { margin-bottom: .5rem; }
.linkFibs { font-size: 14px; }
.indiceCategorie { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 1rem 0 0; }
.indiceCategorie a {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
	border: 1px solid #151618; color: #151618; font-weight: 700; text-decoration: none;
}
.indiceCategorie a:hover { background: #151618; color: #fff; }

/* Contenuto della stagione centrato e non troppo largo sugli schermi grandi */
.stagione > .row > .columns, .categorie > .row > .columns { max-width: 860px; margin: 0 auto; float: none; }

/* Roster delle stagioni senza foto: numero di maglia al posto della foto */
.giocatore.senzaFoto { padding: 18px 8px 16px; justify-content: flex-start; }
.giocatoreMaglia {
	display: flex; align-items: center; justify-content: center;
	width: 64px; height: 64px; border-radius: 50%; margin-bottom: 10px;
	background: #151618; color: #fff; font-weight: 700; font-size: 24px;
}

/* ---------- Statistiche giocatore (Serie B) ---------- */
.giocatore.conStat { padding: 0; }
.giocatoreLink {
	display: flex; flex-direction: column; align-items: center; width: 100%; height: 100%;
	padding: 0 0 12px; color: inherit; text-decoration: none; position: relative;
}
.giocatoreLink:hover, .giocatoreLink:focus-visible { outline: none; }
.giocatore.conStat:hover, .giocatore.conStat:focus-within { border-color: #1C4596; box-shadow: 0 0 0 1px #1C4596; }
.giocatoreStat {
	margin-top: 8px; font-size: 12px; font-weight: 700; color: #1C4596;
	border: 1px solid #1C4596; padding: 4px 10px; border-radius: 999px;
}
.giocatoreLink:hover .giocatoreStat, .giocatoreLink:focus-visible .giocatoreStat { background: #1C4596; color: #fff; }

/* ===== Finestra statistiche giocatore ===== */
.statDialog {
	--blu: #1C4596; --notte: #0f1b33; --riga: #e7e9ee; --testo: #151618; --tenue: #6b7080;
	width: min(880px, calc(100vw - 24px)); height: min(660px, calc(100dvh - 24px));
	max-width: none; max-height: none; padding: 0; border: 0; border-radius: 14px;
	background: #fff; color: var(--testo); box-shadow: 0 24px 70px rgba(5, 10, 25, .45); overflow: hidden;
}
.statDialog[open] { display: flex; flex-direction: column; }
.statDialog::backdrop { background: rgba(8, 12, 24, .65); backdrop-filter: blur(2px); }
.statDialog, .statDialog p, .statDialog span, .statDialog abbr, .statDialog button,
.statDialog h3, .statDialog table, .statDialog th, .statDialog td, .statDialog strong { font-family: 'Oxygen', sans-serif; font-style: normal; }

/* testata scura */
.statTesta {
	flex: none; display: grid; grid-template-columns: 64px minmax(0,1fr) auto 40px; gap: 4px 16px; align-items: center;
	padding: 16px 16px 16px 20px; background: linear-gradient(120deg, var(--notte) 0%, #1a3264 100%); color: #fff;
}
.statFoto img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: top; display: block; background: #2a3a5c; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
.statMeta { margin: 0 0 2px; font-size: 13px; color: rgba(255,255,255,.7); letter-spacing: .02em; }
.statNumero { font-weight: 700; color: #fff; margin-right: 8px; }
.statNumero:empty { display: none; }
.statTesta h3 { margin: 0; color: #fff; font-size: 1.45rem; line-height: 1.15; font-weight: 700; }
.statChiudi {
	grid-column: 4; grid-row: 1; width: 40px; height: 40px; border-radius: 50%; border: 0;
	background: rgba(255,255,255,.1); color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
}
.statChiudi:hover, .statChiudi:focus-visible { background: rgba(255,255,255,.22); outline: none; }
/* interruttore Stagione corrente / Carriera */
.statVista { grid-column: 3; grid-row: 1; display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.1); }
.statVista button {
	min-height: 34px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent;
	color: rgba(255,255,255,.8); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.statVista button[aria-pressed="true"] { background: #fff; color: var(--notte); }
.statVista button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* schede Battuta / Lancio / Difesa */
.statSchede { flex: none; display: flex; gap: 6px; padding: 12px 20px; border-bottom: 1px solid var(--riga); }
.statSchede [role="tab"] {
	min-height: 34px; padding: 0 16px; border: 1px solid var(--riga); border-radius: 999px; background: #fff;
	font-weight: 700; font-size: 13px; color: var(--tenue); cursor: pointer;
}
.statSchede [role="tab"]:hover { border-color: #c9cfdc; color: var(--testo); }
.statSchede [role="tab"][aria-selected="true"] { background: var(--blu); border-color: var(--blu); color: #fff; }
.statSchede [role="tab"].senzaDati:not([aria-selected="true"]) { color: #b4b8c2; }
.statSchede [role="tab"]:focus-visible { outline: 2px solid var(--blu); outline-offset: 2px; }

/* corpo che scorre: la finestra resta della stessa misura */
.statCorpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.statCorpo [role="tabpanel"] { padding: 20px; }

/* stagione: numeri principali */
.statChiave { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); margin-bottom: 20px; }
.statChiave div { padding: 4px 12px; border-left: 1px solid var(--riga); }
.statChiave div:first-child { border-left: 0; padding-left: 0; }
.statChiave strong { display: block; font-size: 30px; line-height: 1.1; font-weight: 700; color: var(--testo); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.statChiave abbr { display: block; margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--blu); text-decoration: none; border: 0; cursor: help; }
.statChiave span { display: block; font-size: 12px; color: var(--tenue); line-height: 1.3; }
/* stagione: dettaglio */
.statTitoletto { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tenue); }
.statDettaglio { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); column-gap: 28px; }
@media only screen and (max-width: 860px) { .statDettaglio { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.statRiga { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--riga); font-size: 14px; }
.statRiga span { color: var(--tenue); min-width: 0; }
.statRiga abbr { display: inline-block; min-width: 38px; font-weight: 700; color: var(--testo); text-decoration: none; border: 0; cursor: help; }
.statRiga strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.statVuoto { color: var(--tenue); margin: 24px 0; text-align: center; }

/* carriera: tabella */
.carrieraBox { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.carrieraBox:focus-visible { outline: 2px solid var(--blu); outline-offset: 2px; }
.carriera { width: 100%; border-collapse: collapse; margin: 0; border: 0; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; background: #fff; }
.carriera thead, .carriera tbody, .carriera tfoot { border: 0; background: transparent; }
.carriera th, .carriera td { padding: 10px 9px; text-align: right; border-bottom: 1px solid var(--riga); background: #fff; color: var(--testo); }
.carriera thead th { padding-top: 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tenue); border-bottom: 2px solid var(--testo); }
.carriera thead th abbr { color: inherit; text-decoration: none; border: 0; cursor: help; }
.carriera thead th:nth-child(-n+3), .carriera td:nth-child(2), .carriera td:nth-child(3) { text-align: left; }
.carriera tbody tr:hover th, .carriera tbody tr:hover td { background: #f6f8fc; }
.carriera td:nth-child(3) { color: var(--tenue); }
.carriera tr.ponte td:nth-child(2) { color: var(--blu); font-weight: 700; }
.carriera .cStagione { position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 700; padding-left: 0; box-shadow: 8px 0 8px -8px rgba(0,0,0,.12); }
.carriera tfoot th, .carriera tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--testo); background: #f3f5fa; }
.carriera tfoot .cStagione { padding-left: 8px; color: var(--blu); }

.statFonte { flex: none; margin: 0; padding: 10px 20px; font-size: 12px; color: var(--tenue); border-top: 1px solid var(--riga); background: #fafbfc; }
.statFonte a { color: var(--blu); font-weight: 700; font-family: 'Oxygen', sans-serif; }

@media only screen and (max-width: 640px) {
	.statDialog { width: 100vw; height: 100dvh; border-radius: 0; }
	.statTesta { grid-template-columns: 52px minmax(0,1fr) 40px; padding: 14px 12px 14px 16px; row-gap: 14px; }
	.statFoto img { width: 52px; height: 52px; }
	.statTesta h3 { font-size: 1.2rem; }
	.statChiudi { grid-column: 3; }
	.statVista { grid-column: 1 / -1; grid-row: 2; display: flex; }
	.statVista button { flex: 1; }
	.statSchede { padding: 10px 16px; }
	.statSchede [role="tab"] { flex: 1; padding: 0 8px; }
	.statCorpo [role="tabpanel"] { padding: 16px; }
	.statChiave { grid-template-columns: repeat(3, minmax(0,1fr)); row-gap: 16px; }
	.statChiave div:nth-child(4) { border-left: 0; padding-left: 0; }
	.statChiave strong { font-size: 24px; }
	.statDettaglio { grid-template-columns: 1fr; }
	.statFonte { padding: 10px 16px; }
}

/* Loghi squadre in classifica */
.classifica .sqCella { display: inline-flex; align-items: center; gap: 10px; vertical-align: middle; }
.logoSq { flex: none; width: 40px; height: 30px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.08); background: #fff; }
.logoVuoto { display: inline-flex; align-items: center; justify-content: center; background: #eef0f4; color: #6b7080; font-size: 10px; font-weight: 700; letter-spacing: .03em; font-style: normal; }

/* ===== Risultati a schede (home, Serie B, Giovanili) ===== */
.garaFiltro { display: flex; gap: 8px; margin: 0 0 24px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.garaFiltro::-webkit-scrollbar { display: none; }
.garaFiltro button {
	flex: none; white-space: nowrap; min-height: 38px; padding: 0 16px; border: 1px solid #e7e9ee; border-radius: 999px; background: #fff;
	font-size: 13px; font-weight: 700; color: #6b7080; cursor: pointer;
}
.garaFiltro button small { font-weight: 400; margin-left: 4px; }
.garaFiltro button[aria-pressed="true"] { background: #0f1b33; border-color: #0f1b33; color: #fff; }
.garaFiltro button:focus-visible { outline: 2px solid #1C4596; outline-offset: 2px; }
.garaMese { margin-bottom: 28px; }
.garaMese[hidden] { display: none; }
.garaMeseTitolo { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 2px solid #151618; font-size: 1.05rem; font-weight: 700; }
.garaMeseTitolo small { font-size: 13px; font-weight: 400; color: #6b7080; }
.gare { margin: 0; }
.gara {
	display: grid; grid-template-columns: 48px 40px minmax(0,1fr) auto; gap: 14px; align-items: center;
	padding: 12px 4px; border-bottom: 1px solid #e7e9ee;
}
.gara[hidden] { display: none; }
.garaData { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #6b7080; line-height: 1.1; }
.garaData b { display: block; font-size: 22px; letter-spacing: 0; color: #151618; }
.gara .logoSq { width: 40px; height: 30px; }
.garaInfo strong { font-size: 15px; color: #151618; }
.garaInfo small { display: block; margin-top: 2px; font-size: 13px; color: #6b7080; }
.garaInfo a { color: #1C4596; font-weight: 700; font-family: 'Oxygen', sans-serif; }
.garaFase { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: #fff4e0; color: #9a5b00; font-size: 11px; font-weight: 700; vertical-align: 2px; }
.garaRis { display: flex; align-items: center; gap: 10px; }
.garaRis b { min-width: 3.4em; text-align: right; font-size: 20px; font-variant-numeric: tabular-nums; color: #151618; }
.garaP .garaRis b { color: #6b7080; }
.garaRis .esito { width: 26px; height: 26px; line-height: 26px; border-radius: 50%; text-align: center; font-size: 12px; font-weight: 700; color: #fff; }
.garaRis .esitoV { background: #1f8a4c; }
.garaRis .esitoP { background: #c0392b; }
.garaNo { font-size: 13px; color: #6b7080; font-style: italic; }

@media only screen and (max-width: 640px) {
	.gara { grid-template-columns: 40px 32px minmax(0,1fr) auto; gap: 10px; }
	.gara .logoSq { width: 32px; height: 24px; }
	.garaRis { flex-direction: column-reverse; align-items: flex-end; gap: 4px; }
	.garaRis b { font-size: 17px; }
	.garaRis .esito { width: 22px; height: 22px; line-height: 22px; font-size: 11px; }
	.garaFase { margin-left: 6px; }
}
.risultatiBox, .risultatiBox span, .risultatiBox small, .risultatiBox button, .risultatiBox strong, .risultatiBox b,
.risultatiBox time, .risultatiBox h3, .risultatiBox h4, .risultatiBox a { font-family: 'Oxygen', sans-serif; font-style: normal; }
.risultatiBox { margin: 0 0 1rem; }
h4.garaMeseTitolo { text-transform: none; letter-spacing: 0; }
