/* Vollbild-Modus: kein WordPress-Theme drumherum */
* { -webkit-tap-highlight-color: transparent; }

html, body.ma-fullscreen-body {
    margin: 0 !important;
    padding: 0 !important;
    background: #9A4C8A !important;
    overflow: hidden;
    height: 100%;
    width: 100%;
    /* iOS Safe-Area (Notch/Home-Indicator) */
    padding-top: env(safe-area-inset-top) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
}

/* App scrollt intern, nicht die ganze Seite */
body.ma-fullscreen-body .ma-app {
    max-width: 100%;
    width: 100%;
    height: 100dvh;          /* Dynamic Viewport Height */
    height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* App-Leiste bleibt oben fixiert */
body.ma-fullscreen-body .ma-appbar {
    flex: 0 0 auto;
}

/* Views-Bereich nimmt den Rest ein und scrollt intern */
body.ma-fullscreen-body .ma-views {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* Verhindert dass Footer hinter Android-Navigationsleiste verschwindet.
       env(safe-area-inset-bottom) gilt für iPhone-Notch, aber Android-Browser
       melden das nicht – daher zusätzlich 72px als fester Puffer. */
    padding-bottom: max(72px, env(safe-area-inset-bottom, 0px));
}

/* Kein WordPress-Admin-Bar-Versatz im Frontend */
html { margin-top: 0 !important; }
#wpadminbar { display: none !important; }

/* Install-Banner im Vollbild-Modus: über allem anderen */
body.ma-fullscreen-body .ma-install-banner {
    position: fixed !important;
    z-index: 99999 !important;
    /* Sicher über iOS Home-Indicator */
    bottom: calc(20px + env(safe-area-inset-bottom)) !important;
}
