/* NightVenture — final Phaser zoom/UI overrides loaded after the shared button theme. */

/* Zoom is handled by the Phaser camera and the WebGL drawing buffer, never by DOM transforms. */
.nv-phaser-lab__host canvas {
    transform: none !important;
    transform-origin: 50% 50% !important;
    will-change: auto !important;
}

/* The upper action row uses the same compact pill language as the lower navigation. */
body.nv-phaser-persistent-active .nv-phaser-lab__actions {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
    padding: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    scrollbar-width: none !important;
}

body.nv-phaser-persistent-active .nv-phaser-lab__actions::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

body.nv-phaser-persistent-active .nv-phaser-lab__actions button,
body.nv-phaser-persistent-active #barreVuePrincipale button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 5px 10px !important;
    border-radius: 999px !important;
    font: 700 0.66rem/1 "Segoe UI", Arial, sans-serif !important;
    white-space: nowrap !important;
}

/* Compact FPS indicator placed directly below the Phaser action buttons. */
.nv-phaser-fps-hud {
    position: absolute;
    z-index: 22;
    top: var(--nv-phaser-fps-top, 43px);
    left: 10px;
    display: block;
    min-width: 42px;
    margin: 0;
    padding: 2px 5px;
    border: 1px solid currentColor;
    border-radius: 4px;
    background: rgba(3, 10, 18, 0.66);
    color: #94a3b8;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    font: 800 9px/1.15 "Segoe UI", Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.025em;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    backdrop-filter: blur(3px);
}

.nv-phaser-fps-hud[data-level="good"] {
    color: #4ade80;
}

.nv-phaser-fps-hud[data-level="warning"] {
    color: #fb923c;
}

.nv-phaser-fps-hud[data-level="critical"] {
    color: #f87171;
}

/* Keep only the navigation buttons: remove the dark tray/container behind them. */
html body.nv-phaser-persistent-active #appShell #barreVuePrincipale,
html body.nv-phaser-persistent-active #appShell #barreVuePrincipale.nv-hud-navigation,
html body.nv-phaser-persistent-active > #barreVuePrincipale.nv-phaser-navigation-docked,
html body.nv-phaser-persistent-active #navigationPrincipale #barreVuePrincipale {
    min-height: 0 !important;
    padding: 4px 6px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

@media (max-width: 760px) {
    body.nv-phaser-persistent-active .nv-phaser-lab__actions {
        top: max(5px, env(safe-area-inset-top)) !important;
        right: 5px !important;
        left: 5px !important;
        max-width: calc(100vw - 10px) !important;
    }

    body.nv-phaser-persistent-active .nv-phaser-lab__actions button,
    body.nv-phaser-persistent-active #barreVuePrincipale button {
        height: 28px !important;
        min-height: 28px !important;
        padding: 4px 8px !important;
        font-size: 0.62rem !important;
    }

    .nv-phaser-fps-hud {
        left: 7px;
        padding: 2px 4px;
        font-size: 8px;
    }
}
