/* Blueprint Noir Lightbox
 * Full-screen image viewer for lesson content
 * Click image thumbnail -> opens in lightbox
 * Close: X button, Escape, click outside image
 */

/* Overlay (backdrop) */
.lightbox-overlay {
  /* Positioning */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;

  /* Layout */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Visual */
  background: rgba(15, 20, 25, 0.95);
  backdrop-filter: blur(12px);

  /* Animation */
  opacity: 0;
  transition: opacity var(--transition-base);
}

.lightbox-overlay.active {
  opacity: 1;
}

/* Close button */
.lightbox-close {
  /* Positioning */
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10001;

  /* Sizing */
  width: 48px;
  height: 48px;

  /* Layout */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Visual */
  background: rgba(42, 52, 65, 0.8);
  border: 2px solid rgba(212, 165, 116, 0.3);
  border-radius: 50%;
  color: var(--color-copper-light);
  cursor: pointer;

  /* Transitions */
  transition: all var(--transition-quick);
}

.lightbox-close:hover {
  background: rgba(212, 165, 116, 0.2);
  border-color: var(--color-copper-light);
  transform: scale(1.1);
}

.lightbox-close:active {
  transform: scale(0.95);
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
}

/* Content container */
.lightbox-content {
  /* Sizing */
  max-width: 90vw;
  max-height: 90vh;

  /* Layout */
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Animation */
  transform: scale(0.95);
  transition: transform var(--transition-base);
}

.lightbox-overlay.active .lightbox-content {
  transform: scale(1);
}

/* Image */
.lightbox-image {
  /* Sizing */
  max-width: 100%;
  max-height: calc(90vh - 4rem);
  width: auto;
  height: auto;

  /* Visual */
  border-radius: var(--radius-md);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(212, 165, 116, 0.1);

  /* Prevent close on image click */
  cursor: default;
}

/* Caption */
.lightbox-caption {
  /* Spacing */
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;

  /* Typography */
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #D1D5DB;
  text-align: center;

  /* Visual */
  background: rgba(26, 31, 38, 0.8);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 165, 116, 0.15);
}

/* Thumbnail styling for lesson images with lightbox */
.lightbox-thumbnail {
  cursor: zoom-in;
  transition: all var(--transition-quick);
}

.lightbox-thumbnail:hover {
  transform: scale(1.02);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(212, 165, 116, 0.1);
}

/* Hint indicator */
.lightbox-hint {
  /* Positioning */
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;

  /* Layout */
  display: flex;
  align-items: center;
  gap: 0.375rem;

  /* Visual */
  padding: 0.375rem 0.75rem;
  background: rgba(15, 20, 25, 0.85);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 165, 116, 0.2);

  /* Typography */
  font-size: 0.75rem;
  color: var(--color-copper-light);

  /* Interaction */
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-quick);
}

.lightbox-thumbnail:hover .lightbox-hint {
  opacity: 1;
}

.lightbox-hint svg {
  width: 14px;
  height: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }

  .lightbox-close svg {
    width: 20px;
    height: 20px;
  }

  .lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .lightbox-image {
    max-height: calc(95vh - 5rem);
    border-radius: var(--radius-sm);
  }

  .lightbox-caption {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
}
