/* Photo lightbox, shared by the homepage and /decks (see assets/js/goe-lightbox.js).
   The photos sit in one horizontal scroll-snap track: a finger swipe scrolls it natively
   (momentum, snap, no JS touch handlers). The arrows and arrow keys just scroll the same track. */
#photoLightbox {
  display: none; position: fixed; inset: 0; z-index: 10001;
  background: rgba(6,14,26,0.96); backdrop-filter: blur(10px);
  align-items: center; justify-content: center; flex-direction: column;
}
#photoLightbox.open { display: flex; }
.lightbox-header {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(to bottom, rgba(6,14,26,0.9), transparent);
  z-index: 2;
}
.lightbox-title {
  font-size: 11px; letter-spacing: 2.5px; color: var(--gold, #c9a227); text-transform: uppercase;
  font-family: 'Playfair Display', Georgia, serif;
}
.lightbox-close {
  background: rgba(201,162,39,0.12); border: 1px solid rgba(201,162,39,0.4);
  color: var(--cream, #f0ead6); width: 38px; height: 38px; border-radius: 50%;
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.15s; line-height: 1;
}
.lightbox-close:hover { background: rgba(201,162,39,0.35); transform: scale(1.1); }
.lightbox-stage {
  position: relative; width: 100%; max-width: 900px; padding: 0 60px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-track {
  width: 100%; display: flex;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; -ms-overflow-style: none;
  border-radius: 12px; border: 1px solid rgba(201,162,39,0.2);
  background: var(--navy-card, #0a1628);
}
.lightbox-track::-webkit-scrollbar { display: none; }
.lightbox-slide {
  flex: 0 0 100%; min-width: 0; scroll-snap-align: center; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center;
  max-height: 68vh;
}
.lightbox-slide img {
  max-width: 100%; max-height: 68vh; object-fit: contain; display: block;
  user-select: none; -webkit-user-drag: none;
}
.lightbox-fallback {
  display: flex; align-items: center; justify-content: center; height: 300px; width: 100%;
  font-size: 60px; color: #c9a227; background: linear-gradient(135deg, #0d2240, #1a3a1a); border-radius: 12px;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(201,162,39,0.12); border: 1px solid rgba(201,162,39,0.35);
  color: var(--cream, #f0ead6); width: 44px; height: 44px; border-radius: 50%;
  font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; z-index: 2; user-select: none;
}
.lightbox-nav:hover { background: rgba(201,162,39,0.35); }
.lightbox-nav.prev { left: 8px; }
.lightbox-nav.next { right: 8px; }
.lightbox-nav:disabled { opacity: 0.2; cursor: default; pointer-events: none; }
.lightbox-footer { margin-top: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox-counter { font-size: 11px; color: var(--cream-dim, #c4baa4); letter-spacing: 2px; opacity: 0.5; }
.lightbox-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 360px; }
.lightbox-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(201,162,39,0.28); border: 1px solid rgba(201,162,39,0.4);
  cursor: pointer; transition: background 0.25s, transform 0.25s; padding: 0; outline: none;
}
.lightbox-dot.active { background: var(--gold, #c9a227); transform: scale(1.35); }
.lightbox-dot:focus-visible { outline: 2px solid var(--gold, #c9a227); outline-offset: 3px; }
@media (max-width: 640px) {
  .lightbox-stage { padding: 0 48px; }
  .lightbox-nav { width: 36px; height: 36px; font-size: 16px; }
  .lightbox-nav.prev { left: 4px; }
  .lightbox-nav.next { right: 4px; }
}
/* Touch-only devices swipe: the arrow buttons are not needed and the photo gets the full width. */
@media (hover: none) {
  .lightbox-nav { display: none; }
  .lightbox-stage { padding: 0 12px; }
}
