/* ============================================================
   lightbox.css — sitewide lightbox styles
   ------------------------------------------------------------
   Used by lightbox.js. Any element with class "zoomable" or
   "nat-cell" that contains an <img> becomes a lightbox target.
   ============================================================ */

.zoomable, .nat-cell { cursor: zoom-in; }

.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18,17,10,0.94);
  display: none;
  z-index: 9999;
  cursor: zoom-out;
  /* allow swipe gestures on iOS */
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.lb-overlay.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 4.5rem 4.5rem;
  box-sizing: border-box;
}

.lb-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  cursor: default;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  object-fit: contain;
  pointer-events: none;
  /* smooth slide-in when swiping */
  transition: transform 0.25s ease, opacity 0.25s ease;
  will-change: transform, opacity;
}
.lb-img.is-dragging {
  transition: none;
}

.lb-close {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 10001;
}
.lb-close:hover { background: rgba(255,255,255,0.16); }

.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, opacity 0.15s;
  z-index: 10001;
}
.lb-nav:hover { background: rgba(255,255,255,0.16); }
.lb-nav:disabled,
.lb-nav.hidden {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }

.lb-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.6);
  pointer-events: none;
  text-transform: uppercase;
}
.lb-caption {
  flex: 1;
  text-align: left;
}
.lb-counter {
  flex: 0 0 auto;
  text-align: right;
  color: rgba(255,255,255,0.4);
}
/* hide caption bar when both fields are empty */
.lb-overlay[data-empty-bar="true"] .lb-bar { display: none; }

@media (max-width: 640px) {
  .lb-stage { padding: 1.5rem 0.75rem 3.5rem; }
  .lb-nav { width: 40px; height: 40px; }
  /* on touch, hide nav arrows since swipe is primary */
  @media (hover: none) {
    .lb-nav { display: none; }
  }
}
