/* BEPL ERP PWA shell helpers. Business module styling remains in style.css. */
.bepl-pwa-offline-badge {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1094;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    max-width: calc(100vw - 2rem);
    padding: .65rem .85rem;
    border: 1px solid rgba(220, 53, 69, .2);
    border-radius: .65rem;
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #212529);
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .12);
    font-size: .825rem;
    font-weight: 500;
}

.bepl-pwa-offline-dot {
    width: .55rem;
    height: .55rem;
    flex: 0 0 .55rem;
    border-radius: 50%;
    background: var(--bs-danger, #dc3545);
}

@media (display-mode: standalone) {
    html {
        min-height: 100%;
        background: var(--bs-body-bg, #fff);
    }

    body {
        min-height: 100vh;
        min-height: 100dvh;
        overscroll-behavior-y: none;
    }
}

/* Shared install affordance for tenant ERP and RUDRA Control Plane. */
.rudra-pwa-install-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    gap: .15rem;
}

@media (display-mode: standalone) {
    [data-rudra-pwa-install-wrap] {
        display: none !important;
    }
}

/* RUDRA v34 Android standalone scroll hardening.
   Keep the document as the vertical scrolling surface and explicitly allow
   pan gestures on Platform content. Drawer/profile locks still win through
   their existing !important rules while open. */
@media (display-mode: standalone) and (max-width: 991.98px) {
    html.rudra-platform-root,
    body.rudra-platform-body {
        height: auto !important;
        min-height: 100% !important;
        overflow-x: hidden !important;
    }

    body.rudra-platform-body {
        overflow-y: visible !important;
        overscroll-behavior-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .rudra-platform-template-shell {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .rudra-platform-template-shell > .page-wrapper,
    .rudra-platform-template-shell [data-bepl-shell-content] {
        overflow-y: visible;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }
}
