/* Keep the exit control above Safari's video surface and reliably tappable. */
.watch-video.is-immersive .immersive-topbar,
.watch-video:fullscreen .immersive-topbar {
  z-index: 8;
  pointer-events: auto;
}

.watch-video.is-immersive .immersive-topbar > span,
.watch-video:fullscreen .immersive-topbar > span {
  pointer-events: none;
}

.watch-video.is-immersive .immersive-exit,
.watch-video:fullscreen .immersive-exit {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* iOS Safari consumes taps on the native video layer, so the exit must not auto-hide. */
@media (max-width: 720px) {
  .watch-video.is-immersive .immersive-exit,
  .watch-video:fullscreen .immersive-exit {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .watch-video.is-immersive .immersive-exit:active,
  .watch-video:fullscreen .immersive-exit:active {
    transform: scale(.96);
  }
}
