/* ═══════════════════════════════════════════════════════════════════════════
   LAYER 3 CO-LOCATED STYLES: MediaLightbox (`components/feed/MediaLightbox.css`)
   Tier-5 Fullscreen Media Viewer, Swipe Carousel, 1x/2x Zoom & Thumbnail Strip
   ═══════════════════════════════════════════════════════════════════════════ */

.x-lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(4, 6, 12, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
  animation: agxScaleIn 0.18s ease-out;
}

.x-lightbox-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  z-index: 2;
}

.x-lightbox-left,
.x-lightbox-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.x-lb-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-strong);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.x-lb-circle-btn:hover,
.x-lb-circle-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}

.x-lb-counter {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.x-lb-channel {
  font-size: 13px;
  color: var(--text-secondary);
}

.x-lb-oracle-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 9999px;
  background: var(--accent);
  border: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.x-lightbox-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px 64px;
  touch-action: pan-y;
}

.x-lightbox-media-holder {
  max-width: 100%;
  max-height: 76dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s ease;
}

.x-lightbox-media-holder.is-zoomed {
  transform: scale(1.85);
  cursor: zoom-out;
}

.x-lightbox-img {
  max-width: 92vw;
  max-height: 76dvh;
  object-fit: contain;
  border-radius: 10px;
  cursor: zoom-in;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
}

.x-lightbox-media-holder.is-zoomed .x-lightbox-img {
  cursor: zoom-out;
}

.x-lightbox-video {
  max-width: 92vw;
  max-height: 76dvh;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
}

.x-lb-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-strong);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
  transition: background 0.15s ease, transform 0.15s ease;
}

.x-lb-nav-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.x-lb-nav-arrow.prev {
  left: 18px;
}

.x-lb-nav-arrow.next {
  right: 18px;
}

.x-lightbox-bottom {
  padding: 12px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.92));
}

.x-lightbox-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 92vw;
  padding: 4px;
}

.x-lb-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: var(--bg-surface-solid);
  padding: 0;
  cursor: pointer;
  opacity: 0.55;
  flex-shrink: 0;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.x-lb-thumb.active {
  opacity: 1;
  border-color: var(--accent);
  transform: scale(1.06);
}

.x-lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.x-lb-thumb-vid {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.x-lightbox-caption {
  max-width: 720px;
  font-size: 13px;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.45;
}

@media (max-width: 680px) {
  .x-lightbox-stage {
    padding: 8px 12px;
  }
  .x-lb-nav-arrow {
    width: 40px;
    height: 40px;
  }
  .x-lb-nav-arrow.prev {
    left: 8px;
  }
  .x-lb-nav-arrow.next {
    right: 8px;
  }
}
