/**
 * Product / hub video lightbox popup
 */

html.rpt-video-lightbox-open,
body.rpt-video-lightbox-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.rpt-video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.rpt-video-lightbox[hidden] {
  display: none !important;
}

.rpt-video-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 19, 0.82);
}

.rpt-video-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-width: 100%;
  background: var(--rpt-surface-container-lowest);
  border-radius: var(--rpt-radius-lg);
  box-shadow: var(--rpt-shadow-technical);
  overflow: hidden;
}

.rpt-video-lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--rpt-radius-full);
  background: rgba(26, 32, 44, 0.72);
  color: var(--rpt-on-primary);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--rpt-transition-fast);
}

.rpt-video-lightbox__close:hover,
.rpt-video-lightbox__close:focus {
  background: var(--rpt-electric-green);
}

.rpt-video-lightbox__content {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  background: #000000;
}

.rpt-video-lightbox__content iframe,
.rpt-video-lightbox__content video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000000;
}

@media (max-width: 575px) {
  .rpt-video-lightbox {
    padding: 16px 12px;
  }

  .rpt-video-lightbox__close {
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  .rpt-video-lightbox__content {
    min-height: 180px;
  }
}
