/* ===============================================================================
   lightbox.css — full-screen photo viewer
   Near-opaque charcoal backdrop so the photo is the only thing in view; metadata
   sits quietly beneath it in muted sandstone. Toggled by the .open class in
   gallery.js.
   =============================================================================== */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(20, 21, 20, 0.96);
}
.lightbox.open {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 64px;
}

/* Stage stacks the image over its caption, both centered. */
.lb-stage {
  margin: 0;
  max-width: 1500px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#lb-img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;       /* never crop the photo to fit the frame */
  border-radius: 2px;
}

/* ---- Metadata panel ---- */
.lb-panel {
  text-align: center;
  padding: 18px 8px 0;
  max-width: 860px;
  color: var(--cream);
}
.lb-panel h2 {
  font-family: 'Bitter', serif;
  font-weight: 400;
  font-size: 1.4rem;
  margin-bottom: 4px;
}
.lb-panel p {
  color: var(--sandstone-light);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 auto;
}

/* EXIF: a centered row of small label/value pairs, only those with data. The
   muted monospace-ish treatment keeps it subordinate to the photo. */
.lb-exif {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  margin-top: 12px;
}
.lb-exif div { display: flex; align-items: baseline; gap: 6px; }
.lb-exif dt {
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate-light);
}
.lb-exif dd {
  font-size: 0.82rem;
  color: var(--sandstone-light);
  font-variant-numeric: tabular-nums;
}

.lb-location { margin-top: 12px; }
.lb-location a {
  color: var(--sandstone);
  font-size: 0.82rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 169, 110, 0.4);
  padding-bottom: 1px;
}
.lb-location a:hover { color: var(--sandstone-light); }

/* ---- Controls ---- */
/* Fixed to the viewport (not the image) so they stay put regardless of photo size. */
.lb-btn {
  position: fixed;
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  line-height: 1;
  user-select: none;
}
.lb-btn:hover { opacity: 1; }
.lb-close { top: 16px; right: 26px; font-size: 2.4rem; }
.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3.4rem;
  padding: 0 20px;
}
.lb-prev { left: 6px; }
.lb-next { right: 6px; }

@media (max-width: 600px) {
  .lightbox.open { padding: 40px 12px; }
  .lb-prev, .lb-next { font-size: 2.4rem; padding: 0 8px; }
}
