/* ============================
   WRAPPER
   ============================ */
.gestennis-schedule-wrapper {
    background: #fff;
    padding: 0.5rem 0.5rem 0.5rem;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.06);
}

/* HEADER */
.schedule-header {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding-bottom: 0.75rem;
}

.schedule-title {
    font-size: 1.4rem;
    font-weight: 700;
}

.schedule-date-form input[type="date"] {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
}

.schedule-date-form-mobile {
    margin-top: 1rem;
}

/* ============================
   CARD GIORNI
   ============================ */
.schedule-day-switch {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.schedule-day-switch::-webkit-scrollbar {
    height: 4px;
}
.schedule-day-switch::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 999px;
}

.schedule-day-card {
    flex: 1 0 0;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    background: #f9fafb;
    border-radius: 14px;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    transition: 0.18s ease;
}

.schedule-day-card:hover {
    background: #f3f4f6;
    border-color: rgba(0,0,0,0.12);
}

.schedule-day-card--active {
    background: #0f172a;
    border-color: #0f172a;
    color: #f9fafb;
}

.schedule-day-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.9;
}

.schedule-day-date {
    font-size: 1rem;
    font-weight: 700;
}

.schedule-day-count {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* ============================
   LISTA INCONTRI: GRID 2 COLONNE
   ============================ */
.schedule-list {
    margin-top: 1.4rem;
}

.schedule-list-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem 1.2rem;
}

/* 1 colonna su mobile */
@media (max-width: 991px) {
    .schedule-list-grid {
        grid-template-columns: 1fr;
    }
}

/* Card contenitore match */


.schedule-card {
    height: 100%;
    padding: 1rem 1.1rem 1rem;
    border-radius: 16px;
    background: #fafafa;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ===================================
   HEADER CARD CENTRATO
   =================================== */
.schedule-card-header {
    display: flex;
    justify-content: center;      /* centro orizzontale */
    align-items: center;
    text-align: center;
    margin-bottom: 0.2rem;
    padding-bottom: 0.3rem;
}

.schedule-card-header-inner {
    display: flex;
    flex-direction: column;       /* etichette una sopra l’altra */
    align-items: center;
    gap: 0.35rem;
}

/* Riga con ora e campo */
.schedule-pill-row {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Stile delle pill */
.schedule-pill {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Tournament pill colors (già presenti, le teniamo) */
.schedule-pill-tournament-1 { background: #0ea5e9; color:#fff; }
.schedule-pill-tournament-2 { background: #22c55e; color:#fff; }
.schedule-pill-tournament-3 { background: #6366f1; color:#fff; }
.schedule-pill-tournament-4 { background: #f97316; color:#fff; }

.schedule-pill-time {
    background: rgba(15,23,42,0.06);
    color: #0f172a;
}

.schedule-pill-court {
    background: rgba(148,163,184,0.18);
    color: #0f172a;
}


/* ============================
   BODY: GIOCATORI
   ============================ */
.schedule-card-body {
    margin-top: 0.3rem;
}

.schedule-line--players {
    margin-top: 0.3rem;
}

/* CONTAINER GIOCATORI SU DESKTOP */
.schedule-players {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    flex-wrap: nowrap; /* 🔥 non andare mai a capo */
    gap: 1rem;
}

/* Card verticale giocatore */
.schedule-player-card-vert {
    flex: 0 0 44%;          /* 🔥 larghezza garantita e stabile */
    max-width: 44%;
    background: #ffffff;
    border-radius: 14px;
    padding: 0.8rem 0.9rem 1rem;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Card VS */
.schedule-vs-card-vert {
    flex: 0 0 8%;           /* 🔥 spazio stabile per il VS */
    max-width: 8%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1rem;
    color: #333;
}


/* Evidenzia vincitore */
.schedule-player-card--winner {
    border-color: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251,191,36,0.3);
}

/* Foto PNG: testa visibile */
.schedule-player-photo-wrap {
    width: 86px;
    height: 86px;
    margin: 0 auto;
    border-radius: 999px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.schedule-player-photo {
    width: 110%;
    height: 110%;
    object-fit: cover;
    object-position: top;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* SOLO DOPPIO: centra la foto dentro il cerchio */
.schedule-players--double .schedule-player-photo {
    object-position: center;
    top: 50%;
    transform: translate(-50%, -50%);
}



/* Testo giocatore */
.schedule-player-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.schedule-player-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.schedule-player-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.schedule-player-meta {
    font-size: 0.70rem;       /* più piccolo */
    color: #475569;           /* slate-600, più elegante */
    line-height: 1.15;        /* meno spazio verticale */
    letter-spacing: -0.2px;   /* crenatura minore */
    font-weight: 500;
}

.schedule-player-meta span.ranking {
    font-size: 0.90rem;
    font-weight: 800;
    color: #0f172a;    /* nero elegante */
    letter-spacing: 0.2px;
    display: block;
    margin-bottom: 4px;
}

/* ===========================
   RANKING PILL (classifica)
   =========================== */
.ranking-pill {
    display: inline-block;
    margin-top: 3px;
    margin-bottom: 6px;
    padding: 2px 8px;
    font-size: 0.70rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1e293b); /* blu scuro sportivo */
    border-radius: 999px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}


/* ===========================
   RANKING COLOR SYSTEM
   =========================== */


.ranking-pill {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.70rem;
    font-weight: 800;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #fff;
}

.rank-nc {
    background: #e5e7eb;
    color: #111827;
}

.rank-4 {
    background: #bfdbfe;
    color: #1e3a8a;
}

.rank-3 {
    background: #bbf7d0;
    color: #166534;
}

.rank-2 {
    background: #fed7aa;
    color: #9a3412;
}

.rank-1 {
    background: #fee2e2;
    color: #b91c1c;
}



/* Trophy */
.schedule-winner-trophy {
    font-size: 1rem;
    color: #fbbf24;
}

/* VS centrale */
.schedule-vs-card-vert {
    width: 8%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1rem;
    color: #333;
}

/* ============================
   FOOTER CARD: STATO + SCORE
   ============================ */
.schedule-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.schedule-footer-left,
.schedule-footer-right {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.match-status-badge {
    padding: 3px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    color: #fff;
}

.match-status-scheduled {
    background: #0284c7;
}

.match-status-live {
    background: #b91c1c;
}

.match-status-completed {
    background: #15803d;
}

.schedule-score {
    font-weight: 700;
    color: #111;
}

/* ============================
   EMPTY STATE
   ============================ */
.schedule-empty-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 14px;
    background: #f9fafb;
    text-align: center;
    color: #4b5563;
}

/* ============================
   MOBILE
   ============================ */
@media (max-width: 767px) {
    .gestennis-schedule-wrapper {
        padding: 1.1rem 1rem 1.5rem;
    }

    .schedule-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.4rem;
    }

    /* 🔥 mantieni SEMPRE le card giocatore affiancate */
    .schedule-players {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .schedule-player-card-vert {
        flex: 0 0 44%;
        max-width: 44%;
        width: auto;   /* niente 100% */
    }

    .schedule-vs-card-vert {
        flex: 0 0 auto;
        width: auto;
        margin: 0;
        justify-content: center;
    }
}



/* BLOCCO DATA + ORA (centrato) */
.schedule-dateblock {
    text-align: center;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    line-height: 1.25;
}

/* "sabato 6 dicembre" */
.schedule-dateblock-day {
    font-size: 0.80rem;
    font-weight: 600;
    color: #475569; /* slate-600 */
    text-transform: capitalize;
}

/* "12.30" grande */
.schedule-dateblock-time {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a; /* slate-900 */
    margin-top: 2px;
}


/* ===============================
   FOOTER CARD - CENTRATO
   =============================== */
.schedule-card-footer {
    padding-top: 0.8rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
}

.schedule-footer-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* ===============================
   ETICHETTA DI STATO
   =============================== */

.match-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.match-status-badge--center {
    margin-left: auto;
    margin-right: auto;
}

/* colori già in uso, li lasciamo */
.match-status-scheduled {
    background: #0ea5e9; /* Azzurro: programmato */
}
.match-status-live {
    background: #dc2626; /* Rosso: live */
}
.match-status-completed {
    background: #15803d; /* Verde: concluso */
}

/* ===============================
   RISULTATO GRANDE
   =============================== */

.schedule-score-big {
    font-size: 1.9rem;         /* 🔥 molto grande */
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 1px;
    line-height: 1.1;
    margin-top: 0.2rem;
}

/* fallback iniziali se la foto non è presente */
.schedule-player-initials {
    width: 100%;
    height: 100%;
    background: #d1d5db; /* grigio chiaro */
    color: #374151;      /* grigio scuro */
    font-weight: 800;
    font-size: 1.4rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* Le card giocatore devono consentire posizionamento assoluto */
.schedule-player-card-vert {
    position: relative;
    padding-top: 24px; /* spazio per il badge */
}

/* Badge coppa sopra la card (centrato, tipo notifica) */
.player-trophy-badge-card {
    position: absolute;
    top: -14px;                 /* quanto "sborda" sopra */
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;

    background: #22c55e;        /* verde winner */
    border-radius: 50%;
    border: 3px solid #ffffff;
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    z-index: 0;
}

