/* ============================================================
   WESTCOAST DRAFTING — lightbox.css V2
   Project gallery slideshow lightbox with thumbnail strip,
   slide transitions, and counter.
   ============================================================ */

/* ── Backdrop ────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(10, 10, 18, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.lightbox--open {
  opacity: 1;
  visibility: visible;
}

/* ── Close button ────────────────────────────────────────── */
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 10;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.lightbox-close:hover {
  color: #fff;
  border-color: var(--color-gold, #C9A96E);
  background: rgba(201, 169, 110, 0.12);
}

/* ── Counter ─────────────────────────────────────────────── */
.lightbox-counter {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Nav arrows ──────────────────────────────────────────── */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}

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

.lightbox-prev:hover,
.lightbox-next:hover {
  color: #fff;
  border-color: rgba(201, 169, 110, 0.6);
  background: rgba(201, 169, 110, 0.1);
}

.lightbox-prev:hover { transform: translateY(-50%) translateX(-2px); }
.lightbox-next:hover { transform: translateY(-50%) translateX(2px); }

.lightbox-prev:disabled,
.lightbox-next:disabled {
  opacity: 0.2;
  pointer-events: none;
}

/* ── Main image area ─────────────────────────────────────── */
.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  padding: 70px 100px 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 240px);
  object-fit: contain;
  border-radius: 3px;
  display: block;
  /* Transitions are set dynamically by lightbox.js */
  user-select: none;
  -webkit-user-drag: none;
}

/* ── Caption ─────────────────────────────────────────────── */
.lightbox-caption {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.lightbox-caption__title {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.lightbox-caption__sep {
  color: var(--color-gold, #C9A96E);
  font-size: 0.5rem;
}

.lightbox-caption__year {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

/* ── Thumbnail strip ─────────────────────────────────────── */
#lightbox-thumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 20px 28px;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 100%;
}
#lightbox-thumbs::-webkit-scrollbar { display: none; }

.lb-thumb {
  flex-shrink: 0;
  width: 60px;
  height: 44px;
  border-radius: 3px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s, opacity 0.2s;
  opacity: 0.5;
}

.lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.lb-thumb:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.lb-thumb--active {
  border-color: var(--color-gold, #C9A96E);
  opacity: 1;
  transform: translateY(-2px);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .lightbox-content {
    padding: 60px 16px 0;
  }

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

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
  }

  #lightbox-img {
    max-height: calc(100vh - 210px);
  }

  .lb-thumb {
    width: 48px;
    height: 36px;
  }

  .lightbox-caption {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  .lightbox-caption__sep { display: none; }
}
