/* Lightbox overlay shared across the site */
body.lb-locked { overflow: hidden; }

#lightbox[hidden] { display: none; }
#lightbox {
  position: fixed; inset: 0;
  z-index: 1000;
  background: rgba(8, 9, 13, 0.94);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
  animation: lb-fade .18s ease-out;
}
@keyframes lb-fade {
  from { opacity: 0 } to { opacity: 1 }
}

#lightbox .lb-frame {
  max-width: 92vw; max-height: 92vh;
  margin: 0;
  display: flex; flex-direction: column; align-items: center;
  cursor: default;
}
#lightbox img {
  max-width: 92vw; max-height: 84vh;
  width: auto; height: auto;
  object-fit: contain;
  background: #000;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
#lightbox figcaption {
  margin-top: 14px;
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 12px; letter-spacing: .15em; text-transform: uppercase;
  color: rgba(255,255,255,.75);
}

#lightbox button {
  position: fixed;
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  width: 48px; height: 48px;
  font-size: 26px; line-height: 1;
  cursor: pointer;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s, transform .12s, border-color .12s;
  font-family: -apple-system, sans-serif;
  font-weight: 300;
  padding: 0;
}
#lightbox button:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.4);
  transform: scale(1.05);
}
#lightbox .lb-close { top: 24px; right: 24px; }
#lightbox .lb-prev  { top: 50%; left: 24px;  transform: translateY(-50%); }
#lightbox .lb-next  { top: 50%; right: 24px; transform: translateY(-50%); }
#lightbox .lb-prev:hover { transform: translateY(-50%) scale(1.05); }
#lightbox .lb-next:hover { transform: translateY(-50%) scale(1.05); }

@media (max-width: 640px) {
  #lightbox button { width: 40px; height: 40px; font-size: 22px; }
  #lightbox .lb-close { top: 14px; right: 14px; }
  #lightbox .lb-prev  { left: 8px; }
  #lightbox .lb-next  { right: 8px; }
  #lightbox figcaption { font-size: 10px; padding: 0 16px; text-align: center; }
}
