/* Air Hockey (/air-hockey): only what is the game's own - the two canvases with the lounge, the table and the HUD,
   and the online panel. Buttons, fields and the accent come from the app kit (css/app-kit, docs/app-kit.md), the button
   row from css/app-kit/games.css (every game). Loaded only on this page (StylePaths). The table, the mallets and the puck
   keep their own colours in every look (filter-engines/air-hockey.js).

   Like Naval Combat, the canvases fill the whole stage: the WebGL scene below and the HUD above it, which takes the
   mouse, the keys and the touches. The game lays out its view for any shape. */

.filter-landing-stage.air-hockey-stage {
    position: relative;
    display: block;
    width: 100%;
    min-height: 280px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    padding: 0;
    box-shadow: none;
    background: #120b08;
    background-image: none;
    touch-action: none;
}

/* Absolutely placed so the canvases' own pixel size never stretches the stage. */
.air-hockey-scene,
.air-hockey-hud {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.air-hockey-scene {
    background: #120b08;
    pointer-events: none;
}

.air-hockey-hud {
    background: transparent;
    cursor: none;
}

.air-hockey-landing-app:not([data-ah-phase="play"]) .air-hockey-hud {
    cursor: pointer;
}

.air-hockey-hud:focus-visible {
    box-shadow: inset 0 0 0 3px var(--ak-accent);
}

/* The online panel: the room code in capitals, the status under the buttons. */
.air-hockey-online {
    display: grid;
    gap: 0.6rem;
}

.air-hockey-online[hidden] {
    display: none;
}

.air-hockey-code {
    text-transform: uppercase;
    letter-spacing: 0.25em;
}

.air-hockey-status:empty {
    display: none;
}

/* Phones: a taller view, seen from behind your own mallet. */
@media (max-width: 640px) {
    .filter-landing-stage.air-hockey-stage {
        aspect-ratio: 3 / 4.4;
        max-height: max(100vw, calc(100svh - 4rem));
    }
}
