/* Lightbox — shared by photos.html and map.html */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 7, 0.97);
  z-index: 600;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox.open { display: flex; }

.lightbox-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  max-width: min(1000px, 92vw);
  cursor: default;
}

.lightbox-img-wrap {
  position: relative;
  overflow: hidden;
  max-width: min(1000px, 92vw);
  max-height: 78vh;
  cursor: zoom-in;
  user-select: none;
}
.lightbox-img-wrap.zoomed   { cursor: grab; }
.lightbox-img-wrap.dragging { cursor: grabbing; }

.lightbox img {
  display: block;
  max-width: min(1000px, 92vw);
  max-height: 78vh;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.15s ease;
  pointer-events: none;
  user-select: none;
}
.lightbox img.no-transition { transition: none; }

.zoom-controls {
  position: absolute;
  bottom: 10px; right: 10px;
  display: flex; gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
}
.lightbox-img-wrap:hover .zoom-controls { opacity: 1; }

.zoom-btn {
  font-family: 'Space Mono', monospace;
  font-size: 15px; line-height: 1;
  color: #888;
  background: rgba(10, 8, 7, 0.8);
  border: 1px solid #333;
  width: 28px; height: 28px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s ease;
}
.zoom-btn:hover { color: #ccc; }

.lightbox-meta {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.7;
  align-self: flex-start;
}
.lightbox-title { color: #aaa; font-weight: 700; }
.lightbox-date  { color: #666; margin-left: 12px; }
.lightbox-type  { color: #444; margin-left: 12px; }
.lightbox-desc  { margin-top: 6px; color: #777; font-size: 12px; max-width: 480px; line-height: 1.7; }
.lightbox-place { margin-top: 4px; font-size: 12px; color: #555; }
.lightbox-copy  { margin-top: 10px; font-size: 10px; color: #383838; }

.lightbox-close,
.lightbox-fullscreen {
  position: absolute;
  top: 28px;
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: #666;
  background: none; border: none;
  cursor: pointer; letter-spacing: 0.05em;
  transition: color 0.15s ease; z-index: 10;
}
.lightbox-close      { right: 36px; }
.lightbox-fullscreen { right: 108px; }
.lightbox-close:hover,
.lightbox-fullscreen:hover { color: #aaa; }

.lightbox:fullscreen .lightbox-img-wrap,
.lightbox:-webkit-full-screen .lightbox-img-wrap { max-height: 88vh; max-width: 98vw; }
.lightbox:fullscreen img,
.lightbox:-webkit-full-screen img { max-height: 88vh; max-width: 98vw; }
.lightbox:fullscreen .lightbox-inner { max-width: 98vw; }

.lightbox-nav {
  position: absolute;
  bottom: 32px; right: 36px;
  display: flex; gap: 20px;
}
.lightbox-nav button {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: #666;
  background: none; border: none;
  cursor: pointer; letter-spacing: 0.05em;
  transition: color 0.15s ease;
}
.lightbox-nav button:hover { color: #aaa; }
.lightbox-nav button:disabled { opacity: 0.2; cursor: default; }

@media (hover: none) {
  .lightbox-fullscreen { display: none; }
}
