/* ============================================
   VIDEO MODAL
   ============================================ */

/* Overlay */
.video-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.video-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Container */
.video-modal {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.video-modal-overlay.active .video-modal {
  transform: scale(1) translateY(0);
}

/* Main Content Area (Video Player) */
.video-modal-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Modal Header */
.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 25px;
  border-bottom: 2px solid #f0f0f0;
  background: linear-gradient(135deg, var(--sky-blue) 0%, #a8d8ea 100%);
}

.video-modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--dark-blue);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.video-modal-close {
  background: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--dark-blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-modal-close:hover {
  background: var(--coral);
  color: white;
  transform: scale(1.1);
}

/* Video Player Container */
.video-modal-player {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  background: #000;
}

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

/* Current Video Info */
.video-modal-info {
  padding: 20px 25px;
  background: #f9f9f9;
}

.video-modal-now-playing {
  font-size: 0.8rem;
  color: var(--sky-blue);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.video-modal-video-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--dark-blue);
  margin: 0;
}

/* Sidebar Playlist */
.video-modal-sidebar {
  width: 280px;
  background: #f5f5f5;
  border-left: 2px solid #e0e0e0;
  display: flex;
  flex-direction: column;
}

.video-modal-sidebar-header {
  padding: 15px 20px;
  background: var(--dark-blue);
  color: white;
}

.video-modal-sidebar-header h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.video-modal-sidebar-header span {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Playlist Items */
.video-modal-playlist {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.video-playlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 8px;
  background: white;
  border: 2px solid transparent;
}

.video-playlist-item:hover {
  border-color: var(--sky-blue);
  transform: translateX(5px);
}

.video-playlist-item.active {
  background: var(--sky-blue);
  color: white;
  border-color: var(--sky-blue);
}

.video-playlist-item.active .video-playlist-duration {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

.video-playlist-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sky-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.video-playlist-item.active .video-playlist-number {
  background: white;
  color: var(--sky-blue);
}

.video-playlist-info {
  flex: 1;
  min-width: 0;
}

.video-playlist-title {
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-playlist-duration {
  font-size: 0.7rem;
  background: #e0e0e0;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
}

/* Responsive */
@media (max-width: 800px) {
  .video-modal {
    flex-direction: column;
    max-height: 95vh;
  }
  
  .video-modal-sidebar {
    width: 100%;
    border-left: none;
    border-top: 2px solid #e0e0e0;
    max-height: 200px;
  }
  
  .video-modal-playlist {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    padding: 10px;
  }
  
  .video-playlist-item {
    flex-shrink: 0;
    width: 180px;
    margin-bottom: 0;
  }
}

@media (max-width: 500px) {
  .video-modal-header {
    padding: 15px;
  }
  
  .video-modal-title {
    font-size: 1.1rem;
  }
  
  .video-modal-info {
    padding: 15px;
  }
}
