/* --- MODAL BASE STRUCTURE (Extracted from _modal.css) --- */
.modal {
  display: none;
  position: fixed;
  z-index: 40000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(10px);
  margin: 3% auto;
  padding: 2vh;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  width: 72.5%;
  max-width: 1200px;
  color: #ffffff !important;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding-bottom: 20px;
  position: relative; 
}

.modal-content * {
  color: #ffffff !important;
}

[data-theme^="light"] .modal-content,
[data-theme^="light"] .modal-content * {
  color: #fff !important;
}

[data-theme] .modal-content h2,
[data-theme] .modal-content p strong,
[data-theme] .modal-content .media-details h2,
[data-theme] .modal-content .media-details p strong {
  color: var(--primary-color) !important;
}

[data-theme] .modal-content h2 .title-part-secondary {
    color: var(--lighter-primary-color) !important;
}

.modal-content::-webkit-scrollbar {
  display: none;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: var(--text-color);
  text-decoration: none;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 2vh;
  width: 100%;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: 10px 10px 30px 10px;
        overflow-y: auto;
        font-size: 70%; 
    }
    .video-container {
        margin-top: 2vh;
        width: 100%;
    }
}

@media (min-width: 800px) {
  .modal-content {
    width: 62.5%;
  }
}