/*
 * Barra inferior tipo app (móvil y tablet, < 992px).
 *
 * Las secciones del centro del header (components/app_nav.html con tab=True)
 * se muestran abajo; arriba quedan el logo, la campana, el idioma y "Me".
 * Los botones flotantes (asistente, mensajes, filtros, avisos) suben para no
 * quedar tapados. En escritorio la barra no existe.
 */
:root {
    --gf-tabbar-h: 60px;
    --gf-tabbar-space: calc(var(--gf-tabbar-h) + env(safe-area-inset-bottom, 0px));
}

.gf-tabbar { display: none; }

@media (max-width: 991.98px) {
    .gf-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1030; /* bajo modales, hoja de filtros y panel del asistente */
        display: flex;
        height: var(--gf-tabbar-space);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: #051320;
        border-top: 1px solid rgba(255, 255, 255, .08);
        box-shadow: 0 -6px 20px rgba(5, 19, 32, .25);
    }
    .gf-tab {
        position: relative;
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: rgba(255, 255, 255, .62);
        font-size: .66rem;
        font-weight: 700;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        transition: color .15s ease;
    }
    .gf-tab i { font-size: 1.15rem; }
    .gf-tab:hover, .gf-tab:focus-visible { color: #fff; text-decoration: none; }
    .gf-tab.active { color: #28a745; }
    .gf-tab.active::before {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        width: 26px;
        height: 3px;
        margin-left: -13px;
        border-radius: 0 0 3px 3px;
        background: #28a745;
        box-shadow: 0 0 8px rgba(40, 167, 69, .8);
    }
    .gf-tab-label {
        max-width: 100%;
        padding: 0 2px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .gf-tab .globo-header-badge { top: -6px; right: -10px; }

    /* Header de arriba más bajo: solo una fila */
    .site-nav.site-football { padding: 14px 0 !important; }

    /* Que nada quede debajo de la barra */
    body:has(.gf-tabbar) { padding-bottom: var(--gf-tabbar-space); }
    body:has(.gf-tabbar) .gf-hb-fab { bottom: calc(var(--gf-tabbar-space) + 14px); }
    body:has(.gf-tabbar) .gf-hb-fab-msgs { bottom: calc(var(--gf-tabbar-space) + 18px); }
    body:has(.gf-tabbar) .gf-hb-panel { bottom: calc(var(--gf-tabbar-space) + 80px); max-height: calc(100vh - var(--gf-tabbar-space) - 100px); }
    body:has(.gf-tabbar) .gf-side-fab { bottom: calc(var(--gf-tabbar-space) + 14px); }
    body:has(.gf-tabbar) .gf-toast { bottom: calc(var(--gf-tabbar-space) + 12px); }
}

/* En teléfonos el panel del asistente ocupa toda la pantalla (tapa la barra) */
@media (max-width: 575.98px) {
    body:has(.gf-tabbar) .gf-hb-panel { bottom: 0; max-height: 100%; }
}
