.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] { display: none; }

.lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: var(--tap-target);
  height: var(--tap-target);
  font-size: 1.75rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  min-width: var(--tap-target);
  min-height: var(--tap-target);
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.lightbox-prev { left: var(--space-4); }
.lightbox-next { right: var(--space-4); }
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.18); }

.lightbox-stage {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: pinch-zoom;
}

.lightbox-stage img,
.lightbox-stage video {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  transition: transform 0.15s ease;
  touch-action: pinch-zoom;
}

.lightbox-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  color: #fff;
  padding: var(--space-5) var(--space-4) var(--space-4);
  transform: translateY(100%);
  transition: transform 0.25s ease;
  /* Sits on top of the video's native control bar (volume, scrubber, etc.) —
     let clicks pass through the panel itself, and re-enable them only on its
     actual interactive child, so those controls stay reachable underneath. */
  pointer-events: none;
}

.lightbox-info .show-on-map-btn {
  pointer-events: auto;
}

.lightbox-info.is-open { transform: translateY(0); }

.lightbox-caption { font-size: 1rem; margin: 0 0 var(--space-3); }

.lightbox-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-2) var(--space-4);
  margin: 0 0 var(--space-3);
}

.lightbox-meta dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.6);
}

.lightbox-meta dd { font-size: 0.9rem; }

.show-on-map-btn {
  background: var(--color-accent);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  min-height: var(--tap-target);
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-info { transition: none; }
}
