/* YouTube play lightbox (homepage videos section) */

body.yt-lightbox-open {
  overflow: hidden;
}

.yt-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10060;
}

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

.yt-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 88%);
}

.yt-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1rem;
  pointer-events: none;
}

.yt-lightbox__close,
.yt-lightbox__frame-wrap {
  pointer-events: auto;
}

.yt-lightbox__frame-wrap {
  width: min(960px, 100%);
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid rgb(var(--color-border));
  overflow: hidden;
}

.yt-lightbox__iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.yt-lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  color: #fff;
  background: rgb(0 0 0 / 72%);
  border: 1px solid rgb(255 255 255 / 28%);
  cursor: pointer;
  transition:
    background-color var(--duration-base, 0.2s) var(--ease-standard, ease),
    border-color var(--duration-base, 0.2s) var(--ease-standard, ease);
}

.yt-lightbox__close:hover {
  background: rgb(0 0 0 / 88%);
  border-color: rgb(255 255 255 / 45%);
}

.yt-lightbox__close:focus-visible {
  outline: 2px solid rgb(var(--color-focus));
  outline-offset: 3px;
}

@media (min-width: 640px) {
  .yt-lightbox__dialog {
    padding: 1.5rem 3.5rem;
  }

  .yt-lightbox__close {
    top: 1rem;
    right: 1rem;
  }
}
