/* ==========================================================================
   VIZURE STUDIO — LIGHTBOX & ADVANCED IMAGE VIEWER
   Full Functional Implementation: Zoom In, Zoom Out, Mouse-Wheel Zoom,
   Drag/Pan when Zoomed, Touch-Friendly, Prev/Next, Escape Key, Scroll Return.
   ========================================================================== */

.vizure-lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background-color: #050505;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
  user-select: none;
  overflow: hidden;
}

.vizure-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Lightbox Header Bar — Sleek Floating Transparent Overlay */
.lightbox-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  padding: 0 clamp(16px, 3vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
  border-bottom: none;
  z-index: 30;
  color: #f5f5f3;
  pointer-events: none;
}

.lightbox-title-box,
.lightbox-toolbar {
  pointer-events: auto;
}

.lightbox-title-box {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.lightbox-counter {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.lightbox-current-tag {
  display: none;
}

/* Lightbox Toolbar Controls */
.lightbox-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lightbox-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background-color: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-btn:hover {
  background-color: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.lightbox-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.lightbox-btn.btn-close {
  background-color: rgba(255, 255, 255, 0.18);
  margin-left: 0.5rem;
}

.lightbox-btn.btn-close:hover {
  background-color: #ffffff;
  color: #080808;
}

.zoom-level-badge {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.85);
  min-width: 52px;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* Lightbox Stage (Canvas area) — 100% Full Viewport */
.lightbox-stage {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: default;
}

.lightbox-stage.can-drag {
  cursor: grab;
}

.lightbox-stage.is-dragging {
  cursor: grabbing;
}

.lightbox-viewport {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.08s ease-out;
}

.lightbox-viewport.is-animating {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-img {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: 100vh;
  object-fit: contain;
  box-shadow: none;
  border-radius: 0px;
  pointer-events: none;
}

/* Navigation Arrows */
.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  z-index: 25;
  transition: all 0.25s ease;
}

.lightbox-nav-btn:hover {
  background-color: #ffffff;
  color: #080808;
  border-color: #ffffff;
  transform: translateY(-50%) scale(1.06);
}

.lightbox-nav-btn.btn-prev {
  left: clamp(16px, 3vw, 40px);
}

.lightbox-nav-btn.btn-next {
  right: clamp(16px, 3vw, 40px);
}

.lightbox-nav-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Lightbox Footer — Transparent Floating Bottom Overlay */
.lightbox-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  padding: 0 clamp(16px, 3vw, 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
  border-top: none;
  z-index: 30;
  color: #f5f5f3;
  pointer-events: none;
}

.lightbox-caption-text {
  display: none;
}

.lightbox-hint {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .lightbox-header {
    height: 52px;
  }

  .lightbox-footer {
    display: none;
  }

  .lightbox-nav-btn {
    width: 42px;
    height: 42px;
  }

  .lightbox-hint,
  .lightbox-current-tag {
    display: none;
  }

  .lightbox-img {
    width: 100vw;
    height: auto;
    max-height: 100vh;
    object-fit: contain;
  }
}