/* =============================================================
   Encabezado que se oculta al deslizar (solo apps iOS/Android, celular).
   La clase html.app-header-hidden la pone public/js/layouts/app-header-scroll.js
   y solo cuando existe html.is-webview. En navegadores no aplica nada.
   ============================================================= */
@media (max-width: 767.98px) {
    .is-webview .main-header {
        transition: transform 0.25s ease, box-shadow 0.25s ease;
        will-change: transform;
    }

    .is-webview.app-header-hidden .main-header {
        /* -100% y un poco más para que no asome la sombra */
        transform: translateY(calc(-100% - 6px));
        box-shadow: none !important;
    }

    /* Lo que va pegado debajo del encabezado sube con él para no dejar hueco */
    .is-webview .panel-mobile-bar,
    .is-webview .panel-filter-sticky {
        transition: top 0.25s ease;
    }

    .is-webview.app-header-hidden .panel-mobile-bar,
    .is-webview.app-header-hidden .panel-filter-sticky {
        top: 0;
    }
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
    .is-webview .main-header,
    .is-webview .panel-mobile-bar,
    .is-webview .panel-filter-sticky {
        transition: none;
    }
}

/* Barra de pestañas inferior (Inicio, Facturas, Solicitar, Empresas, Más):
   se oculta hacia abajo con la misma clase y regresa al subir. Conserva el
   centrado de app-tabbar.css (translateX(-50%)). El botón + del panel baja
   con ella para no quedarse flotando arriba del hueco. */
@media (max-width: 767.98px) {
    .is-webview .app-tabbar {
        transition: transform 0.25s ease;
    }

    .is-webview.app-header-hidden .app-tabbar {
        transform: translate(-50%, calc(100% + var(--app-tabbar-gap, 12px) + env(safe-area-inset-bottom, 0px) + 16px));
    }

    .is-webview .panel-speed-dial {
        transition: bottom 0.25s ease, opacity 0.15s ease;
    }

    .is-webview.app-header-hidden .panel-speed-dial {
        bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
    .is-webview .app-tabbar,
    .is-webview .panel-speed-dial {
        transition: none;
    }
}
