/**
 * Next Game Shortcode — [gbrs_next_game]
 *
 * Fondo transparente: el contenedor de Elementor aplica el verde Spanish Packers.
 * Textos en blanco/dorado por defecto, asumiendo fondo oscuro.
 *
 * Importante: TODOS los selectores incluyen .gbrs-next-game para forzar especificidad
 * y resistir overrides del theme/Elementor.
 *
 * Paleta:
 *   Verde Spanish Packers: #10301f
 *   Dorado Spanish Packers: #f9b45b
 *   Blanco texto: #ffffff
 */

/* ── Tarjeta contenedor ─────────────────────────────────────────────── */

.gbrs-next-game {
    display: block;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    border-radius: 8px;
    color: #ffffff;
}

/* Garantizar que [hidden] oculta el elemento aunque el theme aplique reglas
   de display sobre nuestros descendientes. Sin esto, el .gbrs-next-game__live
   y el .gbrs-next-game__countdown pueden mostrarse simultáneamente al cargar. */
.gbrs-next-game [hidden] {
    display: none !important;
}

/* ── Matchup: logo · separador · logo ───────────────────────────────── */

.gbrs-next-game .gbrs-next-game__matchup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    min-height: 90px;
}

.gbrs-next-game .gbrs-next-game__logo {
    height: 80px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

/* Fallback textual cuando no hay logo */
.gbrs-next-game .gbrs-next-game__logo--text {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    min-width: 80px;
    padding: 0 1rem;
    font-family: "UltimatumBold", "Poppins", sans-serif;
    font-size: 1.5rem;
    color: #ffffff;
    background: rgba(255, 255, 255, .08);
    border-radius: 8px;
}

.gbrs-next-game .gbrs-next-game__sep {
    font-family: "UltimatumBold", "Poppins", sans-serif;
    font-weight: normal;
    font-size: 2.5rem;
    color: #f9b45b;
    line-height: 1;
    text-transform: lowercase;
}

/* ── Cuenta atrás ───────────────────────────────────────────────────── */

.gbrs-next-game .gbrs-next-game__countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.gbrs-next-game .gbrs-cd__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: .5rem .25rem;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(249, 180, 91, .25);
    border-radius: 6px;
    min-width: 0;
}

.gbrs-next-game .gbrs-cd__num {
    font-family: "UltimatumBold", "Poppins", sans-serif;
    font-weight: normal;
    font-size: 2.25rem;
    line-height: 1;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.gbrs-next-game .gbrs-cd__label {
    font-family: "Poppins", sans-serif;
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #f9b45b;
}

/* ── Estado "EN JUEGO" (sustituye a la cuenta atrás cuando llega a cero) ─ */

.gbrs-next-game .gbrs-next-game__live {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    margin-bottom: 1.25rem;
    padding: .85rem;
    background: rgba(231, 76, 60, .15);
    border: 1px solid rgba(231, 76, 60, .5);
    border-radius: 6px;
    font-family: "UltimatumBold", "Poppins", sans-serif;
    font-weight: normal;
    font-size: 1.15rem;
    letter-spacing: .15em;
    color: #ffffff;
    text-transform: uppercase;
}

.gbrs-next-game .gbrs-next-game__live-dot {
    display: inline-block;
    width: .65rem;
    height: .65rem;
    border-radius: 50%;
    background: #e74c3c;
    flex-shrink: 0;
    animation: gbrs-ng-pulse 1.2s ease-in-out infinite;
}

@keyframes gbrs-ng-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: .55;
        transform: scale(1.15);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gbrs-next-game .gbrs-next-game__live-dot {
        animation: none;
    }
}

/* ── Meta inferior (fecha + estadio) ────────────────────────────────── */

.gbrs-next-game .gbrs-next-game__meta {
    text-align: center;
}

.gbrs-next-game .gbrs-next-game__datetime {
    margin: 0 0 .25rem 0;
    font-family: "UltimatumBold", "Poppins", sans-serif;
    font-weight: normal;
    font-size: 1rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #ffffff;
}

.gbrs-next-game .gbrs-next-game__venue {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: .85rem;
    color: #f9b45b;
    letter-spacing: .05em;
}

/* ── Estado vacío (sin partidos futuros) ────────────────────────────── */

.gbrs-next-game .gbrs-next-game__empty-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.gbrs-next-game .gbrs-next-game__empty-text {
    margin: 0;
    font-family: "UltimatumBold", "Poppins", sans-serif;
    font-weight: normal;
    font-size: 1.25rem;
    text-align: center;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #ffffff;
}

/* ── Responsive ─────────────────────────────────────────────────────── */

/* Tablets y móviles grandes */
@media (max-width: 768px) {
    .gbrs-next-game {
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .gbrs-next-game .gbrs-next-game__matchup {
        gap: 1rem;
        min-height: 75px;
    }

    .gbrs-next-game .gbrs-next-game__logo {
        height: 65px;
        max-width: 80px;
    }

    .gbrs-next-game .gbrs-next-game__sep {
        font-size: 2rem;
    }

    .gbrs-next-game .gbrs-cd__num {
        font-size: 3rem;
    }

    .gbrs-next-game .gbrs-cd__label {
        font-size: .65rem;
    }
}

/* Móviles pequeños: la cuenta atrás pasa a 2×2 si el ancho aprieta */
@media (max-width: 380px) {
    .gbrs-next-game .gbrs-next-game__countdown {
        grid-template-columns: repeat(2, 1fr);
    }

    .gbrs-next-game .gbrs-next-game__logo {
        height: 55px;
        max-width: 65px;
    }
}
