/* =====================================================
   classifica_fanta.css
   Stili specifici della classifica.
   Riusa: card-vinaccia, campo, panchina, jersey-slot, fonts
   da formazione.css (caricato prima).
   ===================================================== */

/* Variabili extra non definite in formazione.css */
:root {
    --nero-transp: rgba(18, 0, 40, 0.85);
    --verde: #00ff66;
    --rosso: #ff3333;
}

/* ============================================
   HERO STATS (sotto al titolo nel hero)
   ============================================ */
.cl-hero-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}
.cl-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    padding: 8px 18px;
    min-width: 90px;
}
.cl-hero-stat--mine {
    border-color: var(--rosa-neon);
    background: rgba(255, 25, 255, 0.10);
}
.cl-hero-stat__value {
    font-family: 'DrukWide', sans-serif;
    font-style: italic;
    font-size: 20px;
    color: var(--rosa-neon);
    line-height: 1;
}
.cl-hero-stat__label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    opacity: 0.7;
    color: var(--bianco);
}

.cl-cta-login {
    text-align: center;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--bianco);
    opacity: 0.85;
}
.cl-cta-login a {
    color: var(--rosa-neon);
    font-weight: 700;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .cl-hero-stat { padding: 6px 12px; min-width: 75px; }
    .cl-hero-stat__value { font-size: 16px; }
}


/* ============================================
   TABELLA CLASSIFICA
   Stile sobrio ispirato alla vecchia classifica.css
   ============================================ */
.cl-table-wrap {
    padding: 14px;
}
.cl-table-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    gap: 10px;
    flex-wrap: wrap;
}
.cl-table-title {
    margin: 0;
    font-family: 'DrukWide', sans-serif;
    font-style: italic;
    color: var(--rosa-neon);
    font-size: 1.05rem;
    letter-spacing: 0;
    text-transform: uppercase;
}
.cl-table-hint {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.55;
    color: var(--bianco);
}

.cl-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'HelveticaBold', sans-serif;
}
.cl-table thead th {
    font-family: 'DrukWide', sans-serif;
    font-style: italic;
    background-color: rgba(18, 0, 40, 0.6);
    color: var(--rosa-neon);
    padding: 7px 10px;
    text-align: left;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.cl-th-pos { width: 36px; text-align: center !important; }
.cl-th-pts { text-align: right !important; padding-right: 14px !important; }
.cl-th-go  { width: 32px; }
.cl-th-mgr { width: 30%; }

.cl-table tbody tr {
    background-color: rgba(18, 0, 40, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background-color 0.15s;
    cursor: pointer;
}
.cl-table tbody tr:nth-child(even) {
    background-color: rgba(121, 12, 253, 0.08);
}
.cl-table tbody tr:hover {
    background-color: rgba(255, 25, 255, 0.10);
}
.cl-table tbody tr.is-mine {
    background-color: rgba(255, 25, 255, 0.12) !important;
    box-shadow: inset 3px 0 0 var(--rosa-neon);
}
.cl-table tbody tr.is-mine:hover {
    background-color: rgba(255, 25, 255, 0.18) !important;
}
.cl-table td {
    padding: 7px 10px;
    color: var(--bianco);
    vertical-align: middle;
}

.cl-td-pos {
    font-family: 'DrukWide', sans-serif;
    font-style: italic;
    color: var(--rosa-neon);
    font-size: 0.85rem;
    text-align: center;
    width: 36px;
}

.cl-team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.cl-team-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 25, 255, 0.6);
    flex-shrink: 0;
    background: rgba(18, 0, 40, 0.5);
}
.cl-team-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
}
.cl-team-name {
    font-family: 'HelveticaBold', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0;
    color: var(--bianco);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cl-team-user {
    font-size: 0.55rem;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0;
}
.cl-mine-badge {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 5px;
    background: var(--rosa-neon);
    color: var(--bianco);
    border-radius: 6px;
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    vertical-align: 1px;
}

.cl-td-mgr {
    font-size: 0.65rem;
    opacity: 0.85;
    text-transform: uppercase;
}

.cl-td-pts {
    font-family: 'DrukWide', sans-serif;
    font-style: italic;
    font-size: 0.9rem;
    text-align: right;
    padding-right: 14px;
    color: var(--bianco);
    white-space: nowrap;
}
.cl-td-pts small {
    font-size: 0.55rem;
    opacity: 0.6;
    margin-left: 2px;
    font-style: normal;
}

.cl-td-go { text-align: center; width: 32px; }
.cl-go-btn {
    background: linear-gradient(135deg, var(--rosa-neon), var(--viola));
    border: none;
    border-radius: 50%;
    width: 22px; height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--bianco);
    font-size: 0.6rem;
    transition: transform 0.15s;
}
.cl-go-btn:hover { transform: scale(1.1); }

.cl-empty {
    text-align: center;
    padding: 24px;
    opacity: 0.6;
    color: var(--bianco);
}

/* Mobile: nascondiamo manager column, riduciamo padding */
@media (max-width: 600px) {
    .cl-th-mgr, .cl-td-mgr { display: none; }
    .cl-table thead th { padding: 6px 6px; font-size: 0.55rem; }
    .cl-table td { padding: 6px 6px; }
    .cl-team-name { font-size: 0.62rem; }
    .cl-team-user { font-size: 0.5rem; }
    .cl-td-pos { font-size: 0.75rem; }
    .cl-td-pts { font-size: 0.78rem; padding-right: 6px; }
    .cl-team-logo { width: 24px; height: 24px; }
}


/* ============================================
   MODAL DETTAGLIO FORMAZIONE (full-screen)
   ============================================ */
.dt-modal {
    position: fixed;
    inset: 0;
    background: rgba(18, 0, 40, 0.95);
    backdrop-filter: blur(6px);
    z-index: 1050;
    overflow-y: auto;
    padding: 16px;
    box-sizing: border-box;
}
.dt-modal__inner {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 16px 0 60px;
}
.dt-modal__close {
    position: sticky;
    top: 8px;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: var(--rosa-neon);
    color: var(--bianco);
    border: none;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
}
.dt-modal__close:hover { filter: brightness(1.1); }

/* Header del modal: logo + nome squadra + nome utente */
.dt-team-header {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--nero-transp);
    border: 1px solid rgba(255, 25, 255, 0.15);
    border-radius: 11px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.dt-team-header img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 25, 255, 0.4);
    flex-shrink: 0;
}
.dt-team-header__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.dt-team-header__text small {
    font-size: 0.55rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.dt-team-header__text h2 {
    margin: 0;
    font-family: 'DrukWide', sans-serif;
    font-style: italic;
    color: var(--rosa-neon);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dt-team-header__text .dt-user-line {
    font-size: 0.62rem;
    opacity: 0.8;
    text-transform: uppercase;
}

/* Punti totali */
.dt-total-pts {
    text-align: center;
    background: var(--nero-transp);
    border: 1px solid rgba(255, 25, 255, 0.15);
    border-radius: 11px;
    padding: 12px;
    margin-bottom: 14px;
}
.dt-total-pts__label {
    display: block;
    font-size: 0.6rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.dt-total-pts__value {
    display: block;
    font-family: 'DrukWide', sans-serif;
    font-style: italic;
    color: var(--rosa-neon);
    font-size: 1.6rem;
    line-height: 1.1;
}
.dt-total-pts__value small {
    font-size: 0.6rem;
    opacity: 0.7;
    margin-left: 4px;
    font-style: normal;
}

/* ============================================
   ACCORDION GIORNATE (stile carrieragiocatore)
   ============================================ */
.dt-accordions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.dt-acc-box {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(18, 0, 40, 0.7);
    overflow: hidden;
    transition: border-color 0.3s;
}
.dt-acc-box:hover {
    border-color: rgba(255, 25, 255, 0.4);
}
.dt-acc-box.is-open {
    border-color: rgba(255, 25, 255, 0.5);
}

.dt-acc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.2s;
}
.dt-acc-header:hover {
    background: rgba(255, 255, 255, 0.08);
}

.dt-acc-header__left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.dt-acc-header__gf {
    font-family: 'DrukWide', sans-serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--rosa-neon);
    flex-shrink: 0;
}
.dt-acc-header__label {
    font-family: 'HelveticaBold', sans-serif;
    font-size: 0.62rem;
    color: var(--bianco);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dt-acc-header__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.dt-acc-header__pts {
    font-family: 'DrukWide', sans-serif;
    font-style: italic;
    font-size: 0.8rem;
    color: var(--bianco);
}
.dt-acc-header__pts.is-pending {
    opacity: 0.4;
    font-size: 0.7rem;
}

.dt-acc-toggle {
    color: var(--rosa-neon);
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    display: inline-flex;
}
.dt-acc-box.is-open .dt-acc-toggle {
    transform: rotate(90deg);
}

.dt-acc-content {
    padding: 0;
}

/* Giornata non giocata */
.dt-not-played {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px 16px;
    font-family: 'HelveticaBold', sans-serif;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--bianco);
    opacity: 0.5;
}
.dt-not-played i {
    font-size: 1rem;
    color: var(--rosa-neon);
    opacity: 0.6;
}

/* Riepilogo punti GF corrente */
.dt-gf-summary {
    text-align: center;
    background: var(--nero-transp);
    border: 1px solid rgba(255, 25, 255, 0.15);
    border-radius: 11px;
    padding: 12px;
    margin-bottom: 14px;
}
.dt-gf-summary__label {
    display: block;
    font-size: 0.6rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.dt-gf-summary__value {
    display: block;
    font-family: 'DrukWide', sans-serif;
    font-style: italic;
    color: var(--rosa-neon);
    font-size: 1.6rem;
    line-height: 1.1;
}
.dt-gf-summary__value small {
    font-size: 0.6rem;
    opacity: 0.7;
    margin-left: 4px;
    font-style: normal;
}

/* Container campo + panchina nel modal */
.dt-formazione-wrap {
    background: var(--nero-transp);
    border: 1px solid rgba(255, 25, 255, 0.15);
    border-radius: 11px;
    padding: 16px;
    margin-bottom: 14px;
}

/* Slot in modal: card-non-cliccabili e con punteggio sotto */
.dt-formazione-wrap .posizione,
.dt-formazione-wrap .panchina-slot {
    cursor: default;
}
.dt-formazione-wrap .posizione:hover,
.dt-formazione-wrap .panchina-slot:hover {
    transform: none;
}
.dt-formazione-wrap .portiere:hover,
.dt-formazione-wrap .difensore:hover,
.dt-formazione-wrap .pivot:hover {
    transform: translateX(-50%);
}

/* Punteggio sotto la card (FUORI dalla card) */
.dt-card-score {
    position: absolute;
    bottom: -34px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(18, 0, 40, 0.85);
    border: 1px solid rgba(255, 25, 255, 0.3);
    border-radius: 6px;
    padding: 3px 8px;
    z-index: 6;
    white-space: nowrap;
}
.dt-card-score__pts {
    font-family: 'DrukWide', sans-serif;
    font-style: italic;
    color: var(--bianco);
    font-size: 0.85rem;
    line-height: 1;
}
.dt-card-score__info {
    background: none;
    border: none;
    color: var(--rosa-neon);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    line-height: 1;
}
.dt-card-score__info:hover { color: var(--bianco); }

/* Punteggio capitano: in rosa */
.dt-card-score__pts.is-cap {
    color: var(--rosa-neon);
}

/* Stato visivo: giocatori il cui punteggio NON conta → opacità 40% */
.dt-formazione-wrap .posizione.dt-faded .jersey-slot,
.dt-formazione-wrap .panchina-slot.dt-faded .jersey-slot {
    opacity: 0.4;
    filter: grayscale(0.5);
}

/* Badge "NON GIOCATA" diagonale rosso su titolare che non è entrato in campo */
.dt-badge-non-giocata {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-12deg);
    font-family: 'DrukWide', sans-serif;
    font-style: italic;
    font-size: 0.55rem;
    color: var(--rosso);
    background: rgba(18, 0, 40, 0.92);
    padding: 3px 9px;
    border: 1px solid var(--rosso);
    border-radius: 3px;
    z-index: 7;
    pointer-events: none;
    text-align: center;
    white-space: normal;
    line-height: 1.05;
    letter-spacing: 0;
    max-width: 90%;
}
/* Variante "soft" per panchinari non utilizzati: grigia, meno enfatica */
.dt-badge-non-giocata--soft {
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ─── FRECCE SUB-OUT / SUB-IN stile Champions ─── */
.dt-sub-arrow {
    position: absolute;
    top: -8px;
    left: -8px;
    z-index: 8;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px 2px 4px;
    border-radius: 10px;
    font-family: 'DrukWide', sans-serif;
    font-style: italic;
    font-size: 0.5rem;
    line-height: 1;
    border: 1px solid;
    background: rgba(18, 0, 40, 0.92);
    pointer-events: none;
    letter-spacing: 0;
}
.dt-sub-arrow__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    color: var(--bianco);
    font-size: 0.45rem;
}
.dt-sub-arrow__txt { padding-right: 1px; }

/* OUT = freccia rossa giù */
.dt-sub-arrow--out {
    border-color: var(--rosso);
    color: var(--rosso);
}
.dt-sub-arrow--out .dt-sub-arrow__icon {
    background: var(--rosso);
}

/* IN = freccia verde su */
.dt-sub-arrow--in {
    border-color: var(--verde);
    color: var(--verde);
}
.dt-sub-arrow--in .dt-sub-arrow__icon {
    background: var(--verde);
}

/* Subentrante: niente outline aggressivo, solo la freccia IN basta */
.dt-formazione-wrap .panchina-slot.dt-subentrato {
    /* Lascio il bordo discreto della panchina, non aggiungo outline */
}

/* Spaziatura extra per accomodare il punteggio sotto */
.dt-formazione-wrap .campo-calcio {
    margin-bottom: 28px;
}
.dt-formazione-wrap .panchina {
    /* Più gap per dare spazio al punteggio sotto ogni card */
    row-gap: 44px;
}


/* ============================================
   MODAL ANNIDATO BONUS (più alto in z-index)
   ============================================ */
.bn-modal {
    position: fixed;
    inset: 0;
    background: rgba(18, 0, 40, 0.85);
    backdrop-filter: blur(6px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.bn-modal__inner {
    background: #1a0040;
    border: 1px solid var(--rosa-neon);
    border-radius: 11px;
    width: 100%;
    max-width: 380px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    padding: 16px 18px;
    box-sizing: border-box;
}
.bn-modal__close {
    position: absolute;
    top: 8px; right: 10px;
    background: none;
    border: none;
    color: var(--rosa-neon);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

/* Player header nel modal bonus */
.bn-player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 25, 255, 0.2);
}
.bn-player img {
    width: 42px; height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--rosa-neon);
    flex-shrink: 0;
}
.bn-player__text { display: flex; flex-direction: column; gap: 2px; }
.bn-player__text strong {
    font-size: 0.9rem;
    color: var(--bianco);
    text-transform: uppercase;
}
.bn-player__text small {
    font-size: 0.6rem;
    opacity: 0.7;
    text-transform: uppercase;
}
.bn-player__total {
    margin-left: auto;
    text-align: right;
}
.bn-player__total-pts {
    font-family: 'DrukWide', sans-serif;
    font-style: italic;
    color: var(--rosa-neon);
    font-size: 1.2rem;
    line-height: 1;
}
.bn-player__total small {
    font-size: 0.55rem;
    opacity: 0.7;
    text-transform: uppercase;
    font-style: normal;
}

/* Lista bonus */
.bn-list { list-style: none; padding: 0; margin: 0; }
.bn-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.65rem;
}
.bn-list li:last-child { border-bottom: none; }
.bn-list .bn-name {
    text-transform: uppercase;
    letter-spacing: 0;
    color: var(--bianco);
    flex: 1;
    min-width: 0;
}
.bn-list .bn-qty {
    font-size: 0.55rem;
    opacity: 0.7;
    margin-right: 8px;
}
.bn-list .bn-tot {
    font-family: 'DrukWide', sans-serif;
    font-style: italic;
    min-width: 42px;
    text-align: right;
}
.bn-list li.bn-bonus .bn-tot { color: var(--verde); }
.bn-list li.bn-malus .bn-tot { color: var(--rosso); }

.bn-cap-note {
    margin-top: 10px;
    padding: 8px 10px;
    background: rgba(255, 25, 255, 0.10);
    border: 1px solid rgba(255, 25, 255, 0.3);
    border-radius: 6px;
    font-size: 0.62rem;
    text-align: center;
    color: var(--bianco);
}
.bn-cap-note strong { color: var(--rosa-neon); }

.bn-empty {
    text-align: center;
    padding: 16px;
    opacity: 0.6;
    color: var(--bianco);
    font-size: 0.7rem;
}

@media (max-width: 600px) {
    .dt-team-header img { width: 44px; height: 44px; }
    .dt-team-header__text h2 { font-size: 0.95rem; }
    .dt-total-pts__value { font-size: 1.3rem; }
    .dt-acc-header { padding: 10px 12px; }
    .dt-acc-header__gf { font-size: 0.75rem; }
    .dt-acc-header__label { font-size: 0.55rem; }
    .dt-acc-header__pts { font-size: 0.7rem; }
}