/* Modal shell */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
}
.video-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 2vw;
}

/* Dark backdrop */
.video-modal .video-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
}

/* Centered dialog */
.video-modal .video-dialog {
  position: relative;
  z-index: 1;
  width: min(90vw, 1200px);
  max-height: 80vh;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  overflow: hidden;
}

/* Iframe fills the dialog */
.video-modal .video-embed,
.video-modal .video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Close (X) — fixed to top-right corner of viewport */
.video-modal .video-close {
  position: fixed;
  top: 20px;
  right: 25px;
  z-index: 10001;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease;
}
.video-modal .video-close svg {
  fill: #fff;
  width: 24px;
  height: 24px;
  pointer-events: none;
}
.video-modal .video-close:hover {
  background: rgba(255,255,255,0.35);
}
