/*
 * Reel player — native fullscreen.
 *
 * Kept out of the Tailwind pipeline: these are state-based overrides of
 * utility classes on the stage, and Tailwind's candidate pruning drops some
 * of the :fullscreen rules during the CSS build.
 *
 * Native fullscreen paints the element black. The inline preview frame is
 * capped at 70vh, so without these rules the video fills only the top of the
 * screen and the rest shows as one large black band. In fullscreen the frame
 * owns the whole viewport and the video is letterboxed only by its own aspect
 * ratio.
 */
.reel-stage-container:fullscreen,
.reel-stage-container:-webkit-full-screen {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #000;
}

/* The invisible poster/aspect spacer only sizes the inline frame. */
.reel-stage-container:fullscreen .reel-stage-frame > [aria-hidden="true"],
.reel-stage-container:-webkit-full-screen .reel-stage-frame > [aria-hidden="true"] {
  display: none !important;
}

.reel-stage-container:fullscreen .reel-stage-frame,
.reel-stage-container:-webkit-full-screen .reel-stage-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.reel-stage-container:fullscreen .reel-stage-frame video,
.reel-stage-container:-webkit-full-screen .reel-stage-frame video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
}

/* The inline player keeps its opaque review controls; fullscreen gets its own
   translucent overlay so the video is not boxed in by a white bar. */
.reel-stage-controls--fullscreen {
  display: none;
}

.reel-stage-container:fullscreen .reel-stage-controls--normal,
.reel-stage-container:-webkit-full-screen .reel-stage-controls--normal {
  display: none !important;
}

.reel-stage-container:fullscreen .reel-stage-controls--fullscreen,
.reel-stage-container:-webkit-full-screen .reel-stage-controls--fullscreen {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  display: block;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
