/**
 * YouTube Modal Styles
 * 
 * Reusable modal system for displaying YouTube videos in a popup
 */

/* Modal Overlay */
.youtube-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Show modal */
.youtube-modal-overlay.show {
  display: flex !important;
  opacity: 1;
}

/* Modal Container */
.youtube-modal-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  background: var(--black, #000);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Close Button */
.youtube-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  transition: all 0.3s ease;
  color: var(--black, #000);
}

.youtube-modal-close:hover {
  background: var(--white, #fff);
  transform: scale(1.1);
}

.youtube-modal-close:focus {
  outline: 2px solid var(--Primary-Blue, #005daa);
  outline-offset: 2px;
}

.youtube-modal-close svg {
  width: 20px;
  height: 20px;
}

/* Modal Content */
.youtube-modal-content {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

/* Video Wrapper */
.youtube-modal-video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* YouTube Iframe */
.youtube-modal-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .youtube-modal-overlay {
    padding: 10px;
  }

  .youtube-modal-container {
    max-height: 85vh;
    border-radius: 4px;
  }

  .youtube-modal-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }

  .youtube-modal-close svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  .youtube-modal-overlay {
    padding: 0;
  }

  .youtube-modal-container {
    max-height: 100vh;
    border-radius: 0;
    height: 100vh;
  }

  .youtube-modal-content {
    height: 100%;
    padding-bottom: 0;
  }

  .youtube-modal-video-wrapper {
    height: 100%;
  }
}

/* Accessibility */
.youtube-modal-overlay[aria-hidden='true'] {
  display: none !important;
}

.youtube-modal-overlay:focus {
  outline: none;
}
