/* Simple responsive video lightbox for the homepage. */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 16px 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}
.video-modal.open {
  opacity: 1;
  visibility: visible;
}
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .78);
}
.video-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 32px), calc(177.78vh - 135px));
  max-width: 100%;
  background: #000;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.video-modal-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}
.video-modal-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #fff !important;
  font-size: 0 !important;
  cursor: pointer;
}
.video-modal-close::before,
.video-modal-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: #fff;
}
.video-modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.video-modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.video-modal-close:hover {
  background: rgba(255, 255, 255, .16);
}
.video-modal-close:focus:not(:focus-visible) {
  outline: none !important;
}
.video-modal-close:focus-visible,
[data-video]:focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: 3px;
}
[data-video] {
  cursor: pointer;
}
@media (max-width: 600px) {
  .video-modal {
    padding: 48px 12px 12px;
  }
  .video-modal-dialog {
    width: min(calc(100vw - 24px), calc(177.78vh - 118px));
    border-radius: 6px;
  }
  .video-modal-frame {
    border-radius: 6px;
  }
  .video-modal-close {
    top: -40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .video-modal {
    transition: none;
  }
}
