/* App instalable (PWA): avisos de conexión, instalación, actualización y sesión. */
[data-ga-pwa-install][hidden] { display: none !important; }

.ga-pwa-offline {
    position: fixed; top: 0; left: 0; right: 0; z-index: 2000;
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    background: #b91c1c; color: #fff; font-size: .95rem; font-weight: 600; text-align: center; overflow-wrap: anywhere;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.ga-pwa-offline[hidden] { display: none; }

.ga-pwa-tray {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1990;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 0 12px calc(12px + env(safe-area-inset-bottom)); pointer-events: none;
}
.ga-pwa-notice {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
    width: 100%; max-width: min(560px, calc(100vw - 24px)); padding: 12px 14px; border-radius: 12px;
    background: #0f2034; color: #dce7f3; box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
    pointer-events: auto; font-size: .95rem;
}
.ga-pwa-notice__text { flex: 1 1 220px; min-width: 0; line-height: 1.4; overflow-wrap: anywhere; }

.ga-pwa-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px;
    background: transparent; color: inherit; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.ga-pwa-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.ga-pwa-btn:focus-visible { outline: 3px solid #22d3ee; outline-offset: 2px; }
.ga-pwa-btn--primary { border-color: #1677ff; background: #1677ff; color: #fff; }
.ga-pwa-btn--primary:hover { background: #0f6ce5; }

.ga-pwa-dialog {
    position: fixed; inset: 0; z-index: 2100; display: flex; align-items: flex-end; justify-content: center;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: rgba(9, 24, 42, .6);
}
.ga-pwa-dialog__panel {
    display: flex; flex-direction: column;
    width: 100%; max-width: min(480px, calc(100vw - 32px)); padding: 20px; border-radius: 16px;
    max-height: calc(100vh - 32px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 32px - env(safe-area-inset-bottom));
    background: #fff; color: #1f2937; box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
    overflow-wrap: anywhere;
}
.ga-pwa-dialog__title { flex: 0 0 auto; margin: 0 0 12px; font-size: 1.15rem; font-weight: 700; color: #0f2034; }
/* Los pasos y la nota se desplazan dentro del panel: el botón de cerrar queda siempre a la vista. */
.ga-pwa-dialog__steps { flex: 0 1 auto; min-height: 0; margin: 0 0 12px; padding-left: 1.25rem; line-height: 1.5; overflow-y: auto; }
.ga-pwa-dialog__steps li + li { margin-top: 6px; }
.ga-pwa-dialog__note { flex: 0 1 auto; min-height: 0; margin: 0 0 14px; font-size: .9rem; color: #4b5563; overflow-y: auto; }
.ga-pwa-dialog .ga-pwa-btn { flex: 0 0 auto; }
.ga-pwa-dialog .ga-pwa-btn { width: 100%; }

.ga-pwa-login-install {
    display: block; width: 100%; margin-top: 12px; padding: 10px; border: 1px dashed #9ca3af; border-radius: 8px;
    background: transparent; color: #1677ff; font-weight: 600;
}
