/* styles-3.css: part 3 of 3 of the game styles. Loaded in this order. */
/* ======================================================================
   N. Short landscape (phone lying down): its own layout
   The game becomes a 3-column grid: reels in the middle, win + bet on the left, spin + toggles on the right.
   .controls and .side-right dissolve (display: contents) so their children sit directly on that grid.
   The logo goes away and the jackpots share the top row.
   ====================================================================== */
@media (orientation: landscape) and (max-height: 520px) {
  .app {
    font-size: clamp(11px, 3.6vh, 16px);
  }

  /* Touch targets stay 44 px+ even at this small font size. */
  .btn-pill {
    --ph: 3.75em;
  }

  .btn-round {
    width: 2.95em;
    height: 2.95em;
  }

  .btn-ico {
    width: 2.95em;
    height: 2.95em;
  }

  .entry {
    gap: 0.5em;
  }
  .entry-logo {
    width: min(40vw, 58vh);
  }
  .entry-hoard {
    display: none;
  }

  /* Left column: win bar over bet. Middle: the reels, two rows tall. Right column: spin over toggles. */
  .game {
    grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.4em 0.8em;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      'top top top'
      'winbar machine spin'
      'betcol machine toggles';
    column-gap: 1em;
    padding-bottom: calc(0.9em + var(--safe-b));
    /* 16 px from the side edges, plus the notch */
    padding-left: calc(16px + var(--safe-l));
    padding-right: calc(16px + var(--safe-r));
  }

  .top {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: 'balance jackpots buttons';
    grid-area: top;
  }

  .logo-small,
  .mascot {
    display: none;
  }

  .btn-buy {
    grid-area: toggles;
    align-self: start;
    justify-self: center;
    margin-top: -3.6em;
  }

  .jackpots {
    gap: 0.3em;
    width: min(100%, 44em);
    margin-bottom: 0.3em;
  }

  .jp {
    --jh: 2.6em;
    gap: 0.3em;
  }

  /* four plates in one row: no room for label AND value, so the value takes it all
     (the plate colour says which jackpot it is; the label stays for screen readers) */
  .jp b {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .jp {
    padding: 0 12% 0 19%;
  } /* the value may use the glass up to the gems */
  .jp span {
    font-size: 1.3em;
  }
  .machine {
    grid-area: machine;
  }
  .controls {
    display: contents;
  }

  .bet-col {
    align-self: start;
    margin-top: 0.6em;
    width: 11.5em;
  }

  .bet {
    justify-content: space-between;
  }

  .winbar {
    --ph: 3.4em;
    align-self: end;
    padding: 0 1.4em;
    width: 11.5em;
  }

  .winbar small {
    font-size: 0.7em;
  }
  .winbar b {
    font-size: 1.25em;
  }

  /* Below the win bar in this layout: the top bar is right above it. */
  .spin {
    align-self: end;
    justify-self: center;
  }

  .toggles {
    align-self: start;
  }
}

/* Phone in portrait with the browser bars showing: the em-based sizes drop under a finger's
   size, so every control keeps a 42 px floor (the art scales with the box). */
@media (orientation: portrait) {
  .btn-pill {
    --ph: max(3.7em, 42px);
  }
  .btn-round {
    width: max(2.7em, 42px);
    height: max(2.7em, 42px);
  }
  .btn-ico {
    width: max(2.75em, 42px);
    height: max(2.75em, 42px);
  }
}

/* the prize lands: a flash, no growth (it stays inside its plate) */
.ws-won b.slam {
  animation: ws-hit 0.45s ease-out;
}
@keyframes ws-hit {
  0% {
    filter: brightness(2.4);
  }
}

/* End of assets/ui/styles-3.css */
