/* The Config stage: CONFIG → 2022 → web3 in Config's shape letters, on a canvas. It sits in the case study's
   .soft-inner-shadow frame, on the components' light grey ground in both colour schemes. */

.config-stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #ebebf0;
  /* The frame's corners, so the focus ring follows them. */
  border-radius: inherit;
  overflow: hidden;
  outline: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.config-stage[data-state="live"] {
  cursor: pointer;
}

/* The focus ring, over the canvas (which covers the host's own background). */
.config-stage:focus-visible::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

/* CONFIG at rest: shown until the stage has drawn, and kept if it can't run. */
.config-stage-poster,
.config-stage-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.config-stage[data-state="live"] .config-stage-poster {
  display: none;
}

.config-stage-canvas {
  /* Scrolling and pinch-zoom still work over it. */
  touch-action: manipulation;
}
