/* lightbox.css — full-viewport image overlay.
   Public --lightbox-* custom properties are THEME-owned: this file defines
   only private `--_*-d` defaults, so theme overrides win at any load order. */

:root {
  --_lightbox-bg-d:      rgba(0, 0, 0, 0.85);
  --_lightbox-caption-d: rgba(255, 255, 255, 0.7);
}

@media (prefers-color-scheme: dark) {
  :root {
    --_lightbox-bg-d:      rgba(0, 0, 0, 0.9);
    --_lightbox-caption-d: rgba(230, 232, 236, 0.7);
  }
}

/* Zoom-in cursor only on figures the script actually wired up */
figure.lightbox-enabled {
  cursor: zoom-in;
}

/* Lightbox overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--lightbox-bg, var(--_lightbox-bg-d));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: lightbox-fade-in 0.15s ease-out;
}

@keyframes lightbox-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: default;
}

.lightbox-caption {
  color: var(--lightbox-caption, var(--_lightbox-caption-d));
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: center;
  margin-top: 16px;
  max-width: 60vw;
  line-height: 1.5;
}
