/* Python Blocks: pygame.js (the game window under Screen, and its keys for a finger) */

.pg-stage { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; background: #0f0d16; }
.pg-stage[hidden] { display: none; }
.pg-frame { position: relative; flex: 0 1 auto; min-height: 0; display: flex; justify-content: center; overflow: hidden; }
.pg-view { display: block; background: #000; touch-action: none; cursor: crosshair; image-rendering: auto; }
.pg-view.is-crisp { image-rendering: pixelated; }
.pg-view.no-cursor { cursor: none; }
.pg-view:focus { outline: none; }
.pg-view:focus-visible { box-shadow: var(--focus-ring); }

/* Arrow keys and Space, on touch screens while a game runs. */
.pg-pad { display: none; flex: 0 0 auto; gap: 8px; justify-content: center; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); background: var(--surface); }
.pg-key {
  min-width: 52px; min-height: 48px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 0;
  font: inherit; font-size: 0.82rem; font-weight: 600; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.pg-key.is-space { flex: 1 1 auto; max-width: 140px; }
.pg-key.is-down, .pg-key:active { color: var(--bg); background: var(--gold); border-color: var(--gold); }
@media (pointer: coarse) {
  /* The keys sit right under the window, at the top of the pane, so both are in reach. */
  .pg-stage.is-running { justify-content: flex-start; }
  .pg-stage.is-running .pg-pad { display: flex; }
}

/* terminal.js: the same keys under the Output while a program that imports terminal runs. */
.pb-term-pad[hidden] { display: none !important; }
@media (pointer: coarse) {
  .pb-term-pad { display: flex; }
}
