/* Penalty shootout (/penalty-shootout): only what is the game's own - the canvas with the pitch, the goal and the
   scoreboard. 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 stadium keeps its own night colours
   in both themes (filter-engines/penalty-shootout.js). */

/* The canvas: the scene seen from behind the spot (1000 x 900), no taller than the screen. */
.penalty-shootout-board {
    width: min(100%, calc((100svh - 200px) * 100 / 90));
    min-width: min(100%, 280px);
    aspect-ratio: 100 / 90;
    position: relative;
    min-height: 0;
}

/* Absolutely placed so the canvas's own pixel size never stretches the board past its aspect ratio. */
.penalty-shootout-canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    background: #040714;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.penalty-shootout-canvas:focus-visible {
    box-shadow: 0 0 0 3px var(--ak-accent);
}

/* The shared .game-fit layout (css/app-kit/games.css) fits the board on the screen; --game-room(-touch) is what the
   stage holds besides the board. There are no tiles and no touch pad: the pitch is the touch pad. */
.penalty-shootout-stage {
    --game-aspect: calc(100 / 90);
    --game-max: 1000px;
    --game-room: 24px;
    --game-room-touch: 24px;
    --game-room-short: 16px;
}

/* Phones: the scoreboard goes above the pitch and the hints below it (1000 x 1400). */
@media (max-width: 640px) {
    .penalty-shootout-board {
        width: min(100%, calc((100svh - 170px) * 100 / 140));
        aspect-ratio: 100 / 140;
    }

    .penalty-shootout-stage {
        --game-aspect: calc(100 / 140);
        --game-max: 520px;
    }
}
