/* The video is a background only, not a new clickable content layer. */
.chs-page-main-bg-controlled > .c7yt-direct-video,
.chs-visual-library-hero > .c7yt-direct-video {
  position:absolute!important;
  z-index:2!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  pointer-events:none!important;
  display:block;
  inset:auto;
  top:calc(var(--hca-bg-margin-top,0px) + var(--hca-bg-padding-top,0px));
  right:calc(var(--hca-bg-margin-right,0px) + var(--hca-bg-padding-right,0px));
  bottom:calc(var(--hca-bg-margin-bottom,0px) + var(--hca-bg-padding-bottom,0px));
  left:calc(var(--hca-bg-margin-left,0px) + var(--hca-bg-padding-left,0px));
}
.chs-visual-library-hero > .c7yt-direct-video {z-index:1!important;}
.c7yt-direct-video > iframe {
  position:absolute!important;
  display:block!important;
  border:0!important;
  max-width:none!important;
  max-height:none!important;
  pointer-events:none!important;
  opacity:1!important;
}
.chs-page-main-bg-controlled > .c7yt-direct-video ~ :is(.hero-brand-lockup,.home-date,.home-location,.home-theme,.home-tagline,.home-buttons,.page-title,.page-subtitle,.page-readmore,.hero-actions) {
  z-index:4!important;
}
.chs-page-main-bg-controlled > .home-plants {z-index:3!important;}
.chs-page-main-bg-controlled > .chs-scene-layer,
.chs-visual-library-hero > .chs-scene-layer {z-index:25!important;}
@media(min-width:801px) and (max-width:1100px){
  .chs-page-main-bg-controlled > .c7yt-direct-video,
  .chs-visual-library-hero > .c7yt-direct-video {
    top:calc(var(--hca-tbg-margin-top,0px) + var(--hca-tbg-padding-top,0px));
    right:calc(var(--hca-tbg-margin-right,0px) + var(--hca-tbg-padding-right,0px));
    bottom:calc(var(--hca-tbg-margin-bottom,0px) + var(--hca-tbg-padding-bottom,0px));
    left:calc(var(--hca-tbg-margin-left,0px) + var(--hca-tbg-padding-left,0px));
  }
}
@media(max-width:800px){
  .chs-page-main-bg-controlled > .c7yt-direct-video,
  .chs-visual-library-hero > .c7yt-direct-video {
    top:calc(var(--hca-mbg-margin-top,0px) + var(--hca-mbg-padding-top,0px));
    right:calc(var(--hca-mbg-margin-right,0px) + var(--hca-mbg-padding-right,0px));
    bottom:calc(var(--hca-mbg-margin-bottom,0px) + var(--hca-mbg-padding-bottom,0px));
    left:calc(var(--hca-mbg-margin-left,0px) + var(--hca-mbg-padding-left,0px));
  }
}

/* Hidden devices must never show an empty overlay. */
.c7yt-direct-video[hidden]{display:none!important;}

/* v1.4: keep the aftermovie thumbnail visible while YouTube initializes.
   This avoids showing the player's loading/playlist interface before playback. */
.c7yt-direct-video > .c7yt-loading-poster {
  position:absolute!important;
  inset:0!important;
  z-index:2!important;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  pointer-events:none!important;
  opacity:1;
  transition:opacity .24s ease, visibility 0s linear .24s;
}
.c7yt-direct-video.c7yt-is-playing > .c7yt-loading-poster {
  opacity:0;
  visibility:hidden;
}
.c7yt-direct-video > video {
  position:absolute!important;
  display:block!important;
  max-width:none!important;
  max-height:none!important;
  border:0!important;
  pointer-events:none!important;
  object-fit:cover;
}
.c7yt-direct-video > .c7yt-loading-poster[hidden] {display:none!important;}

/* v1.6: reliable paint order for the video, user-uploaded thumbnail, PNG artwork,
   original theme color/gradient shade, and existing hero text/layers. */
.chs-page-main-bg-controlled.c7yt-has-video > .c7yt-direct-video,
.chs-visual-library-hero.c7yt-has-video > .c7yt-direct-video {z-index:2!important;}
.chs-page-main-bg-controlled.c7yt-has-video > .c7yt-video-art-overlay,
.chs-visual-library-hero.c7yt-has-video > .c7yt-video-art-overlay {
  position:absolute!important;inset:0!important;z-index:4!important;
  pointer-events:none!important;background-position:center;background-repeat:no-repeat;
  border-radius:inherit;
}
.chs-page-main-bg-controlled.c7yt-has-video > .chs-color-shade-overlay,
.chs-visual-library-hero.c7yt-has-video > .chs-color-shade-overlay {
  position:absolute!important;inset:0!important;z-index:6!important;
  pointer-events:none!important;
}
.chs-page-main-bg-controlled.c7yt-has-video > :is(.hero-brand-lockup,.home-date,.home-location,.home-theme,.home-tagline,.home-buttons,.page-title,.page-subtitle,.page-readmore,.hero-actions,.home-plants),
.chs-visual-library-hero.c7yt-has-video > :is(.hero-brand-lockup,.home-date,.home-location,.home-theme,.home-tagline,.home-buttons,.page-title,.page-subtitle,.page-readmore,.hero-actions) {z-index:15!important;}
.chs-page-main-bg-controlled.c7yt-has-video > .chs-scene-layer,
.chs-visual-library-hero.c7yt-has-video > .chs-scene-layer {z-index:25!important;}

/* v1.7: never resurrect a disabled native shade on a video hero. */
.chs-page-main-bg-controlled.c7yt-has-video[data-c7yt-shade-off="1"] > .chs-color-shade-overlay,
.chs-visual-library-hero.c7yt-has-video[data-c7yt-shade-off="1"] > .chs-color-shade-overlay {
  display:none!important;
  visibility:hidden!important;
}
