/* The full-screen-video button on the watch page's stage -- see
   js/player-channel/video-fullscreen.js. Separate from TV mode
   (player-channel-tv.css), which takes the whole page full screen.

   It sits bottom-right on the picture and stays quiet like the sync chip above
   it: a glyph at a third of full strength until the pointer is on it. */

.video-fullscreen {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 6;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;

  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 160ms ease, background-color 160ms ease;
}

.video-fullscreen:hover,
.video-fullscreen:focus-visible,
.pc-stage:hover .video-fullscreen {
  opacity: 1;
}

.video-fullscreen:hover,
.video-fullscreen:focus-visible {
  background: rgba(0, 0, 0, 0.78);
}

.video-fullscreen svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.video-fullscreen[aria-pressed='true'] .vfs-enter,
.video-fullscreen:not([aria-pressed='true']) .vfs-exit {
  display: none;
}

@media (hover: none) {
  .video-fullscreen {
    opacity: 0.7;
    width: 40px;
    height: 40px;
  }
}

/* In full screen: the stage fills the screen instead of holding 16:9 to the
   page width, and Kick's player letterboxes inside the iframe. */
.pc-stage:fullscreen {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0;
  background: #000;
}

.pc-stage:-webkit-full-screen {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0;
  background: #000;
}

/* The fallback where there is no full-screen API (iPhone Safari): pinned over
   the whole viewport. */
.pc-stage.is-video-max {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0;
  background: #000;
}

html.has-video-max,
html.has-video-max body {
  overflow: hidden;
}

.pc-stage:fullscreen .pc-feed iframe,
.pc-stage.is-video-max .pc-feed iframe {
  aspect-ratio: auto;
}

.pc-stage:-webkit-full-screen .pc-feed iframe {
  aspect-ratio: auto;
}
