/* ==========================================
   RESULTADO DEL PARTIDO
   ========================================== */

.calendar-game .game-teams {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 5px;

    width: 100%;

}

.calendar-game .game-teams strong {

    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}

.calendar-game .game-score {

    flex-shrink: 0;

    font-size: 11px;

    font-weight: 800;

    color: var(--text);

    white-space: nowrap;

}

.calendar-game.game-past .game-score {

    color: var(--green);

}


/* ==========================================
   MODAL DE PARTIDO
   ========================================== */

.match-modal {

    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

}


/* ==========================================
   FONDO DEL MODAL
   ========================================== */

.match-modal-backdrop {

    position: absolute;

    inset: 0;

    background: rgba(0, 0, 0, 0.72);

    backdrop-filter: blur(6px);

}


/* ==========================================
   TARJETA DEL MODAL
   ========================================== */

.match-modal-card {

    position: relative;

    z-index: 1;

    width: min(100%, 520px);

    padding: 28px 24px 24px;

    background: var(--panel);

    border: 1px solid rgba(255, 255, 255, 0.08);

    border-radius: 18px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.55);

    animation: modalEntrada 0.2s ease-out;

}


@keyframes modalEntrada {

    from {

        opacity: 0;

        transform:
            translateY(12px)
            scale(0.98);

    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            scale(1);

    }

}


/* ==========================================
   BOTÓN CERRAR
   ========================================== */

.close-modal {

    position: absolute;

    top: 12px;

    right: 14px;

    width: 34px;

    height: 34px;

    border: none;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.06);

    color: var(--text-soft);

    font-size: 24px;

    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;

}

.close-modal:hover {

    background: rgba(255, 255, 255, 0.12);

    color: var(--text);

    transform: rotate(90deg);

}


/* ==========================================
   JORNADA
   ========================================== */

.modal-matchday {

    display: block;

    margin-bottom: 8px;

    color: var(--green);

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1.4px;

    text-transform: uppercase;

}


/* ==========================================
   FECHA Y HORA DEL MODAL
   ========================================== */

.modal-date {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    margin-bottom: 25px;

    color: var(--text-soft);

    font-size: 12px;

}

.modal-date strong {

    color: var(--text);

    font-size: 14px;

    font-weight: 700;

}


/* ==========================================
   EQUIPOS DEL MODAL
   ========================================== */

.modal-teams {

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(70px, 90px)
        minmax(0, 1fr);

    align-items: center;

    gap: 16px;

    width: 100%;

    padding: 22px 10px;

    border-top:
        1px solid rgba(255, 255, 255, 0.06);

    border-bottom:
        1px solid rgba(255, 255, 255, 0.06);

}


.modal-team {

    min-width: 0;

    width: 100%;

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 10px;

}


.modal-team strong {

    display: block;

    width: 100%;

    max-width: 130px;

    color: var(--text);

    font-size: 14px;

    font-weight: 700;

    line-height: 1.25;

    text-align: center;

    overflow-wrap: break-word;

    word-break: normal;

}


.modal-home {

    text-align: center;

    padding-right: 8px;

}


.modal-away {

    text-align: center;

    padding-left: 8px;

}


/* ==========================================
   ESCUDOS DEL MODAL
   ========================================== */

.modal-team-logo {

    width: 54px;

    height: 54px;

    object-fit: contain;

    display: block;

}


.modal-team-logo.hidden {

    display: none;

}


/* ==========================================
   RESULTADO DEL MODAL
   ========================================== */

.modal-score {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    width: 100%;

    min-width: 70px;

    gap: 5px;

}


.modal-score > span {

    display: block;

    color: var(--text);

    font-size: 25px;

    line-height: 1;

    font-weight: 800;

    letter-spacing: 0.5px;

    white-space: nowrap;

}


.modal-score > small {

    display: block;

    color: var(--text-muted);

    font-size: 9px;

    line-height: 1;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.8px;

    white-space: nowrap;

}


/* ==========================================
   UBICACIÓN
   ========================================== */

.modal-location {

    display: flex;

    align-items: flex-start;

    gap: 12px;

    margin-top: 20px;

    padding: 15px;

    border-radius: 12px;

    background: rgba(255, 255, 255, 0.035);

}


.modal-location > div:first-child {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 34px;

    height: 34px;

    flex-shrink: 0;

    border-radius: 9px;

    background: rgba(183, 243, 74, 0.08);

    font-size: 17px;

}


.modal-location-info {

    display: flex;

    flex-direction: column;

    min-width: 0;

}


.modal-location-info strong {

    color: var(--text);

    font-size: 12px;

    font-weight: 700;

    line-height: 1.3;

}


.modal-location-info > span {

    margin-top: 3px;

    color: var(--text-soft);

    font-size: 10px;

}


/* ==========================================
   GOOGLE MAPS
   ========================================== */

.modal-maps-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: fit-content;

    margin-top: 11px;

    padding: 7px 10px;

    border:
        1px solid rgba(183, 243, 74, 0.18);

    border-radius: 7px;

    background: rgba(183, 243, 74, 0.07);

    color: var(--green);

    font-size: 9px;

    font-weight: 700;

    text-decoration: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;

}


.modal-maps-button:hover {

    background: rgba(183, 243, 74, 0.13);

    border-color:
        rgba(183, 243, 74, 0.35);

    transform: translateY(-1px);

}


/* ==========================================
   HIDDEN
   ========================================== */

.match-modal.hidden {

    display: none;

}


/* ==========================================
   PRÓXIMO PARTIDO
   ========================================== */

.next-game-info {

    text-align: center;

}


.next-game-teams {

    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: center;

    gap: 10px;

    width: 100%;

    margin-bottom: 14px;

}


.next-game-team {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 7px;

    min-width: 0;

}


.next-game-logo {

    width: 42px;

    height: 42px;

    object-fit: contain;

    display: block;

}


.next-game-team strong {

    display: block;

    max-width: 110px;

    color: var(--text);

    font-size: 11px;

    font-weight: 700;

    line-height: 1.25;

    text-align: center;

}


.next-game-vs {

    color: var(--text-soft);

    font-size: 9px;

    font-weight: 700;

    letter-spacing: 1px;

}


/* ==========================================
   INFORMACIÓN PRÓXIMO PARTIDO
   ========================================== */

.next-game-info > small {

    display: block;

    width: 100%;

    margin-top: 9px;

    color: var(--text-soft);

    font-size: 13px;

    font-weight: 500;

    line-height: 1.4;

    text-align: center;

}


/* ==========================================
   ESTADIO PRÓXIMO PARTIDO
   ========================================== */

.next-game-info > small:last-child {

    margin-top: 7px;

    font-size: 13px;

    font-weight: 600;

    text-align: center;

}


/* ==========================================
   MÓVIL
   ========================================== */

@media (max-width: 600px) {

    .match-modal {

        padding: 14px;

    }


    .match-modal-card {

        padding: 25px 18px 18px;

        border-radius: 16px;

    }


    .modal-date {

        margin-bottom: 20px;

    }


    .modal-teams {

        gap: 8px;

        padding: 20px 4px;

    }


    .modal-team-logo {

        width: 46px;

        height: 46px;

    }


    .modal-team strong {

        max-width: 105px;

        font-size: 12px;

    }


    .modal-score {

        min-width: 58px;

    }


    .modal-score span {

        font-size: 20px;

    }


    .modal-location {

        margin-top: 16px;

    }


    .next-game-logo {

        width: 38px;

        height: 38px;

    }


    .next-game-team strong {

        max-width: 95px;

        font-size: 10px;

    }


    .next-game-info > small {

        font-size: 13px;

        text-align: center;

    }


    .next-game-info > small:last-child {

        font-size: 13px;

        text-align: center;

    }

}
/* ==========================================
   CUENTA ATRÁS · PRÓXIMO PARTIDO
   ========================================== */

.calendar-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 13px;
    text-align: center;
}

.calendar-countdown span {
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
}

#calendar-next-countdown {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

#calendar-next-countdown.countdown-warning {
    color: #ff4d4d;
}

#calendar-next-countdown.countdown-live {
    color: var(--green);
}