/* Post-image lightbox - click any inline content image (.content-img, see
   layouts/_markup/render-image.html) to view it larger, with prev/next through every image
   in the post, a counter, and a close button - see static/js/lightbox.js.
   The overlay is intentionally dark regardless of the active site theme (light/mono) - a
   photo viewer reads correctly against a dark backdrop either way, and it avoids the
   surrounding UI fighting for attention while an image is open. */
.lightbox-overlay{
  position:fixed;
  inset:0;
  z-index:200;
  background:rgba(4,4,4,0.94);
  display:none;
  align-items:center;
  justify-content:center;
  padding:56px;
}
/* static/js/lightbox.js only ever toggles this .open class - an @keyframes animation
   restarts automatically the moment an element goes from display:none to displayed (unlike
   a transition, which needs the element already rendered at its start value), so both the
   backdrop fade and the image's slight scale-in work as a CSS-only addition here. */
.lightbox-overlay.open{
  display:flex;
  animation:lightboxFadeIn .2s ease;
}
@keyframes lightboxFadeIn{
  from{ opacity:0; }
  to{ opacity:1; }
}
.lightbox-img{
  max-width:90vw;
  max-height:82vh;
  width:auto;
  height:auto;
  object-fit:contain;
  border:1px solid rgba(255,255,255,0.15);
  background:#0a0a0a;
  animation:lightboxImgIn .25s ease;
}
@keyframes lightboxImgIn{
  from{ opacity:0; transform:scale(.96); }
  to{ opacity:1; transform:scale(1); }
}
.lightbox-btn{
  position:fixed;
  width:40px;
  height:40px;
  border-radius:999px;
  background:#f4f4f4;
  color:#0a0a0a;
  border:none;
  display:grid;
  place-items:center;
  cursor:pointer;
  z-index:201;
  opacity:0.9;
  transition:opacity .2s;
}
.lightbox-btn:hover{
  opacity:1;
}
.lightbox-close{
  top:16px;
  right:16px;
}
.lightbox-prev{
  left:16px;
  top:50%;
  transform:translateY(-50%);
}
.lightbox-next{
  right:16px;
  top:50%;
  transform:translateY(-50%);
}
.lightbox-counter{
  position:fixed;
  bottom:16px;
  left:50%;
  transform:translateX(-50%);
  z-index:201;
  background:rgba(244,244,244,0.92);
  color:#0a0a0a;
  font-family:var(--mono);
  font-size:12px;
  padding:5px 12px;
  letter-spacing:.04em;
}
@media (max-width:768px){
  .lightbox-overlay{
    padding:16px;
  }
  .lightbox-img{
    max-width:100vw;
    max-height:76vh;
  }
  .lightbox-prev{
    left:8px;
  }
  .lightbox-next{
    right:8px;
  }
  .lightbox-btn{
    width:36px;
    height:36px;
  }
}
