/**
 * Modular Video Proof Engine - Styling
 */

.video-proof-section {
  background: var(--bg-primary);
  padding: var(--space-2xl) 0;
}

.video-dashboard {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(244, 244, 244, 0.05);
}

.player-container {
  position: relative;
  width: 100%;
  background: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  height: 0;
  overflow: hidden;
}

.player-container.open {
  height: auto;
  aspect-ratio: 16 / 9;
}

#proof-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.catalog-container {
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: none;
  background: rgba(0, 0, 0, 0.2);
}

.catalog-header {
  padding: var(--space-sm) var(--space-md);
  background: rgba(10, 26, 62, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(244, 244, 244, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 5;
}

.catalog-header h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dme-gold);
  margin: 0;
}

.segment-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm) 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0;
}

.segment-item {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid rgba(244, 244, 244, 0.03);
  border-right: 1px solid rgba(244, 244, 244, 0.03);
  cursor: pointer;
  transition: background 0.3s ease;
  background: transparent;
  min-width: 0;
}

.segment-item:hover {
  background: rgba(208, 173, 92, 0.08);
}

.segment-item.active {
  background: rgba(208, 173, 92, 0.15);
  border-left: 4px solid var(--dme-gold);
}

.segment-item.active .segment-title {
  color: var(--dme-gold);
}

.segment-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: rgba(208, 173, 92, 0.1);
  border: 1px solid rgba(208, 173, 92, 0.2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--dme-gold);
}

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

.segment-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--dme-offwhite);
  margin-bottom: 4px;
  transition: color 0.3s ease;
}

.segment-desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  color: rgba(244, 244, 244, 0.5);
  line-height: 1.4;
}

.segment-time {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 13px;
  color: rgba(208, 173, 92, 0.5);
  align-self: flex-start;
  margin-top: 2px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .segment-list {
    grid-template-columns: 1fr;
  }
  .catalog-header h3 {
    font-size: 18px;
  }
}

/* =========================================
   VIDEO MODAL (LIGHTBOX)
   ========================================= */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none; /* hidden by default */
  align-items: center;
  justify-content: center;
}

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

.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.video-modal__content {
  position: relative;
  width: 90%;
  max-width: 1100px;
  background: #000;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(244, 244, 244, 0.1);
  z-index: 2;
  overflow: hidden;
}

.video-modal__close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: var(--dme-offwhite);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
  z-index: 3;
}

.video-modal__close:hover {
  color: var(--dme-gold);
}

.video-modal__player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.video-modal__player-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .video-modal__close {
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
  }
}


/* Proof Buttons (Sprinkling) */
.proof-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(208, 173, 92, 0.1);
  border: 1px solid rgba(208, 173, 92, 0.3);
  border-radius: 4px;
  color: var(--dme-gold);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.proof-trigger:hover {
  background: var(--dme-gold);
  color: var(--dme-black);
}

.proof-trigger svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 1024px) {
  .video-dashboard {
    grid-template-columns: 1fr;
  }
  .catalog-container {
    height: 400px;
    border-left: none;
    border-top: 1px solid rgba(244, 244, 244, 0.05);
  }
}
