/* Shared full-screen photo/video viewer — used on the public site (gallery, room page)
   and in the admin (media grids). Triggered by any <a class="lightbox-item">; all
   .lightbox-item elements sharing the nearest [data-lightbox-group] ancestor form the
   filmstrip. See assets/js/lightbox.js. */

.lightbox-item { display: block; cursor: pointer; }

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(12, 10, 9, 0.94);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 24px;
}

.lightbox-overlay.is-open { display: flex; }

.lightbox-main {
  max-width: min(92vw, 1100px);
  max-height: 66vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-main img,
.lightbox-main video {
  max-width: 100%;
  max-height: 66vh;
  border-radius: 10px;
  object-fit: contain;
  background: #000;
}

.lightbox-caption {
  color: #f2ede0;
  font-size: 0.92rem;
  margin-top: 14px;
  max-width: 700px;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }

.lightbox-close {
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 2rem;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-strip {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  max-width: 92vw;
  overflow-x: auto;
  padding: 4px;
}

.lightbox-thumb {
  flex: 0 0 auto;
  width: 76px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  opacity: 0.55;
  background: #000;
  transition: opacity 0.15s, border-color 0.15s;
}

.lightbox-thumb img,
.lightbox-thumb video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

.lightbox-thumb.is-active,
.lightbox-thumb:hover { opacity: 1; border-color: var(--sea-bright); }

body.lightbox-locked { overflow: hidden; }

@media (max-width: 640px) {
  .lightbox-nav { width: 42px; height: 42px; font-size: 1.6rem; }
  .lightbox-close { width: 38px; height: 38px; font-size: 1.5rem; }
  .lightbox-thumb { width: 56px; height: 42px; }
}
