/*
 * Decorative background videos: <video class="bg-video"> in the page banners.
 *
 * iOS Safari draws its own big "play" button over any video it refuses to autoplay
 * (Low Power Mode, some in-app browsers, pages restored with the back button).
 * These rules make sure visitors never see that button or a frozen frame: the video
 * stays invisible until it is really playing, then fades in.
 * Works together with assets/js/bg-video.js.
 */

.bg-video {
    pointer-events: none;           /* taps go to the page, never to the video */
    transition: opacity 0.6s ease;  /* fade in instead of popping in */
}

/* Hide every part of WebKit's native media controls, including the start button. */
.bg-video::-webkit-media-controls,
.bg-video::-webkit-media-controls-enclosure,
.bg-video::-webkit-media-controls-panel,
.bg-video::-webkit-media-controls-play-button,
.bg-video::-webkit-media-controls-overlay-play-button,
.bg-video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
}

/* Safari 15.4+: a paused background video is invisible.
   Kept as its own rule so browsers without :paused support skip only this rule. */
.bg-video:paused {
    opacity: 0 !important;
}

/* Set by bg-video.js until the first frame has loaded. */
.bg-video.bgv-wait {
    opacity: 0 !important;
}
