
/* Magic 1Xtra: authentication screens own no navigation.
   Detect the rendered login screen even if SPA state is stale. */

html:has(#page .mx-flutter-login) body #bottomNav,
html:has(#page .mx-flutter-login) body #mxHomeAirplayNavV14,
html:has(#page .mx-flutter-login) body #mxPhoneNavUnified,
html:has(#page .mx-flutter-login) body #mxNavRescue,
html:has(#page .mx-flutter-login) body #mxRemainingFlutterWorkspace,
html:has(#page .mx-flutter-login) body #mxFlutterMarketTabs,
html:has(#page .mx-flutter-login) body .mx-rescue-service-nav,
html:has(#page .mx-flutter-login) body .bottom-nav,
html:has(#page .mx-flutter-login) body .mini-player,
html:has(#page .mx-flutter-login) body .flutter-mini-player,
html:has(#page .mx-flutter-login) body #playerHost,
html:has(#page .mx-flutter-login) body nav[aria-label="Magic 1Xtra main navigation"],
html:has(#page .mx-flutter-login) body nav[aria-label="Flutter service navigation"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    pointer-events: none !important;
}

/* Remove false navigation clearance, regardless of stale owner. */
html:has(#page .mx-flutter-login) body #app,
html:has(#page .mx-flutter-login) body #page {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
}

/* Keep the complete login form accessible. */
html:has(#page .mx-flutter-login) body #page {
    overflow: visible !important;
}

html:has(#page .mx-flutter-login) body .mx-flutter-login {
    height: auto !important;
    max-height: none !important;
    min-height: 100dvh !important;
    overflow: visible !important;
    margin-bottom: 0 !important;
}

/* Never hide navigation on other application screens. */
