/* Shared layout top-navigation, audio menu, and bottom-right VR button alignment for A-Frame scenes (Index171-Index199) */

body {
    margin: 0;
    overflow: hidden !important;
}

.navbar {
    position: relative !important;
    z-index: 100000 !important;
    background-color: #ffffff;
}

footer.footer {
    display: none !important;
}

main {
    padding-bottom: 0 !important;
}

body:not(.vr-active) a-scene {
    position: fixed !important;
    top: var(--nav-h, 68px) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: calc(100vh - var(--nav-h, 68px)) !important;
    z-index: 1;
}

html.a-fullscreen body:not(.vr-active) a-scene .a-canvas,
body:not(.vr-active) a-scene .a-canvas {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

body:not(.vr-active) #no,
body:not(.vr-active) #navOverlay {
    position: fixed !important;
    top: calc(var(--nav-h, 68px) + 12px) !important;
    left: 12px !important;
    z-index: 99999 !important;
}

body:not(.vr-active) #audioControls {
    position: fixed !important;
    top: calc(var(--nav-h, 68px) + 12px) !important;
    right: 12px !important;
    left: auto !important;
    z-index: 99999 !important;
    max-width: calc(100vw - 24px);
}

body:not(.vr-active) #vfx {
    top: var(--nav-h, 68px) !important;
}

body:not(.vr-active) #speedhud {
    top: calc(var(--nav-h, 68px) + 58px) !important;
    right: 12px !important;
    z-index: 99998 !important;
}

.a-enter-vr,
.a-enter-ar {
    position: fixed !important;
    bottom: 18px !important;
    right: 18px !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    z-index: 99999 !important;
}

.a-enter-ar {
    right: 82px !important;
}

#titleCard,
#tc {
    z-index: 99998 !important;
}

@media (max-width: 768px) {
    body:not(.vr-active) #audioControls {
        top: calc(var(--nav-h, 68px) + 54px) !important;
        left: 12px !important;
        right: auto !important;
    }

    body:not(.vr-active) #bgMusic {
        width: 150px;
    }

    body:not(.vr-active) #speedhud {
        top: calc(var(--nav-h, 68px) + 12px) !important;
    }

    body:not(.vr-active) #titleCard,
    body:not(.vr-active) #tc {
        bottom: 72px !important;
    }

    body:not(.vr-active) #titleCard h1,
    body:not(.vr-active) #tc h1 {
        font-size: 18px !important;
        letter-spacing: 4px !important;
    }
}

/* Hide top navbar and HUD overlays when entering WebXR VR mode */
body.vr-active .navbar,
body.vr-active #no,
body.vr-active #navOverlay,
body.vr-active #audioControls,
body.vr-active #titleCard,
body.vr-active #tc,
body.vr-active #speedhud,
body.vr-active #vfx {
    display: none !important;
}

body.vr-active a-scene {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
}
