/* The player dimensions come from the surrounding classic frame. DOM games
   position their art and controls on a landscape or portrait design surface. */
.classic-slot-frame .slot-player-screen > .slot-player-host {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  container: slot-screen / size;
}

.classic-slot-frame .slot-player-host > :is(.mr-stage, .fg-stage):not(:fullscreen) {
  --design-ratio: calc(16 / 9);
  width: min(100cqw, 100cqh * var(--design-ratio));
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: var(--design-ratio);
}

.classic-slot-frame .slot-player-host > .lc-stage:not(:fullscreen) {
  --design-ratio: calc(55 / 32);
}

@container slot-screen (orientation: portrait) {
  .classic-slot-frame .slot-player-host > :is(.mr-stage, .fg-stage):not(:fullscreen) {
    --design-ratio: calc(9 / 16);
  }
  .classic-slot-frame .slot-player-host > :is(.ld-stage, .lv-stage, .vm-stage, .wd-stage, .fg-stage, .cp-stage):not(:fullscreen) {
    --design-ratio: calc(390 / 844);
  }
  .classic-slot-frame .slot-player-host > .lf-stage:not(:fullscreen) {
    --design-ratio: calc(390 / 667);
  }
  .classic-slot-frame .slot-player-host > .lc-stage:not(:fullscreen) {
    --design-ratio: calc(39 / 76);
  }
}

/* The iframe renderers measure their own viewport and lay out the reels and
   controls inside it. Give them every available pixel on both axes. */
.classic-slot-frame .slot-player-host > :is(.ov-stage, .gs-stage):not(:fullscreen) {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.classic-slot-frame :is(.ov-surface, .gs-surface),
.classic-slot-frame :is(.ov-surface, .gs-surface) > iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
