/*
 * lightbox.css — neutral, minimal styling for the dependency-free lightbox (D-05).
 *
 * Intentionally low-specificity so the Phase-10 design refresh can restyle it
 * without fighting `!important` or deep selectors. No external font/icon deps;
 * the nav/close glyphs are unicode characters set in lightbox.js.
 */

/* Bound real photos get a subtle affordance that they are clickable. */
.post-content img.lb-bound,
article img.lb-bound {
  cursor: zoom-in;
}

/* Prevent the page from scrolling behind an open overlay. */
.lb-locked {
  overflow: hidden;
}

/* Full-viewport semi-opaque backdrop, hidden until opened. */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  padding: 2rem;
  box-sizing: border-box;
}

.lb-overlay.lb-open {
  display: flex;
}

.lb-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* Centered, fits the viewport; never upscaled beyond the image's natural size. */
.lb-image {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #111;
}

/* Caption strip drawn from the image alt text. */
.lb-caption {
  color: #f2f2f2;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  max-width: 90vw;
  text-wrap: balance;
}

.lb-caption:empty {
  display: none;
}

/* Close + prev/next affordances — plain, dependency-free unicode glyph buttons. */
.lb-close,
.lb-nav {
  position: absolute;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: 0;
  cursor: pointer;
  line-height: 1;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}

.lb-close {
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.75rem;
}

.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  font-size: 2rem;
}

.lb-prev {
  left: 1rem;
}

.lb-next {
  right: 1rem;
}

.lb-close:hover,
.lb-nav:hover,
.lb-close:focus-visible,
.lb-nav:focus-visible {
  background: rgba(0, 0, 0, 0.7);
  outline: none;
}

@media (max-width: 600px) {
  .lb-overlay {
    padding: 0.5rem;
  }
  .lb-nav {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.5rem;
  }
}
