/*
 * The video modal (assets/js/video-modal.js) under a theme without
 * Bootstrap's CSS: Bootstrap 5.3's modal-lg, backdrop and 16:9 ratio, which is
 * how pld-new draws it. pld_blocks_video_modal_assets() only loads this file
 * when Bootstrap's stylesheet isn't on the page. Every selector is wrapped in
 * :where(), so any rule a theme has for these classes wins.
 *
 * The z-index sits above sticky headers, as pld-new's does
 * (css/pld-mega-menu.css).
 */

:where(.pld-video-modal) {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000002;
  display: none;
  width: 100%;
  height: 100%;
  overflow: hidden auto;
  outline: 0;
}

:where(.pld-video-modal-backdrop) {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000001;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

:where(.pld-video-modal.fade, .pld-video-modal-backdrop.fade) {
  transition: opacity 0.15s linear;
}

:where(.pld-video-modal.fade:not(.show), .pld-video-modal-backdrop.fade:not(.show)) {
  opacity: 0;
}

:where(.pld-video-modal-backdrop.show) {
  opacity: 0.5;
}

:where(.pld-video-modal .modal-dialog) {
  position: relative;
  width: auto;
  margin: 0.5rem;
  pointer-events: none;
}

:where(.pld-video-modal.fade .modal-dialog) {
  transform: translate(0, -50px);
  transition: transform 0.3s ease-out;
}

:where(.pld-video-modal.show .modal-dialog) {
  transform: none;
}

:where(.pld-video-modal .modal-content) {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.175);
  border-radius: 0.5rem;
  outline: 0;
}

:where(.pld-video-modal .modal-header) {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
}

:where(.pld-video-modal .modal-header .close) {
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
}

:where(.pld-video-modal .modal-body) {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}

:where(.pld-video-modal .ratio) {
  position: relative;
  width: 100%;
}

:where(.pld-video-modal .ratio)::before {
  display: block;
  padding-top: 56.25%;
  content: '';
}

:where(.pld-video-modal .ratio > *) {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@media (min-width: 576px) {
  :where(.pld-video-modal .modal-dialog) {
    max-width: 500px;
    margin: 1.75rem auto;
  }
}

@media (min-width: 992px) {
  :where(.pld-video-modal .modal-lg) {
    max-width: 800px;
  }
}
