button.video-modal-trigger {
  background: transparent;
  border: 0;
}

.video-modal {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.video-modal.active {
  display: flex !important;
}

/* Video content wrapper - 40-50vw width as requested */
.video-modal-content {
  position: relative;
  width: 50vw;
  max-width: 900px;
  min-width: 400px;
  aspect-ratio: 16/9;
  margin: auto;
  background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Ensure iframe fills the container */
.video-modal-content iframe,
.video-modal-content video {
  width: 100%;
  height: 100%;
  border: none;
}

/* Hide iframe/video by default */
.video-modal iframe,
.video-modal video {
  display: none;
}

.video-modal.active iframe,
.video-modal.active video {
  display: block;
}

/* Click outside to close - the overlay covers the full modal area */
.video-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Close button - positioned outside content area */
.video-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  color: #fff;
  font-size: 36px;
  font-weight: bold;
  padding: 10px 20px;
  cursor: pointer;
  z-index: 100000;
  line-height: 1;
  background: transparent;
  border: none;
}

.video-modal-close:hover {
  color: #ccc;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .video-modal-content {
    width: 90vw;
    min-width: 280px;
  }
  
  .video-modal-close {
    top: -45px;
    right: 10px;
    font-size: 28px;
  }
}