/* Café Puck – only what is special to this game (the shared box is css/game-stage.css). */

/* A phone held upright: a taller box, the table at the top and room under it for the thumb */
@media (max-aspect-ratio: 1 / 1) {
  .stage {
    --aspect: 3 / 4;
  }
}

#game {
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;            /* a finger steers the paddle, never scrolls the page */
}

#game.is-playing {
  cursor: none;                  /* the paddle IS the pointer (the original's way) */
}

.stage .overlay p:empty {
  display: none;
}

.cp-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--muted, #b9b3d9);
}

.cp-filter select {
  font: inherit;
  background: #120b2e;
  color: #fff;
  border: 1px solid rgba(94, 240, 255, 0.4);
  padding: 0.15rem 0.3rem;
}

.cp-lab-host:empty {
  display: none;
}

/* ---------- The lab (?labb): the game and the panel side by side; on a phone the game stays at the top while the
   panel scrolls under it ---------- */

.is-lab .cp-play {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 26rem);
  gap: 1rem;
  align-items: start;
}

.is-lab .cp-play .stage {
  --room: calc(var(--window-height) - var(--stage-top) - 1rem);
  position: sticky;
  top: 3.2rem;
}

@media (max-width: 760px) {
  .is-lab .cp-play {
    display: block;
  }

  /* the site's top bar scrolls away here, or the game box would slide in under it */
  .is-lab .site-header {
    position: static;
  }

  .is-lab .cp-play .stage {
    --room: 54svh;
    top: 0;
    z-index: 20;
    margin-inline: auto;
  }

  .is-lab .cp-lab-host {
    margin-top: 0.8rem;
  }
}

/* The blocker's choice in the café: the table from above with the bar on it (bottom left, clear of the corner buttons) */
.cp-blocker {
  position: absolute;
  left: calc(0.75rem + var(--safe-left, 0px));
  bottom: calc(0.75rem + var(--safe-bottom, 0px));
  z-index: 3;
  width: 3rem;
  height: 3.6rem;
  padding: 0.3rem;
  color: rgba(94, 240, 255, 0.75);
  background: rgba(10, 6, 30, 0.7);
  border: 2px solid rgba(94, 240, 255, 0.45);
  cursor: pointer;
}

.cp-blocker svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cp-blocker:hover,
.cp-blocker:focus-visible,
.cp-blocker.is-on {
  color: #5ef0ff;
  border-color: #ffe94d;
}

.cp-blocker[hidden] {
  display: none;
}
