/* zoom-lightbox.css - Lightbox com Pinch-to-Zoom e Pan Isolados */

/* Trava absoluta do fundo da página quando o lightbox estiver aberto */
body.zoom-lightbox-locked,
html.zoom-lightbox-locked {
  overflow: hidden !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
}

/* Overlay principal */
.zoom-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.zoom-lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Barra superior */
.zoom-lightbox-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

.zoom-lightbox-counter {
  color: #f3f4f6;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 12px;
  border-radius: 999px;
}

.zoom-lightbox-hint {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.zoom-lightbox-close-btn {
  pointer-events: auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: all 0.2s ease;
}

.zoom-lightbox-close-btn:hover,
.zoom-lightbox-close-btn:active {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

/* Área central de visualização */
.zoom-lightbox-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.zoom-lightbox-viewport:active {
  cursor: grabbing;
}

/* Imagem sob zoom */
.zoom-lightbox-image {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  pointer-events: auto;
  will-change: transform;
  transform-origin: center center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.05s ease-out;
}

.zoom-lightbox-image.animating {
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Setas de navegação anterior/próxima */
.zoom-lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 22px;
  line-height: 1;
  transition: all 0.2s ease;
  user-select: none;
}

.zoom-lightbox-nav-btn:hover,
.zoom-lightbox-nav-btn:active {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.08);
}

.zoom-lightbox-nav-btn.prev {
  left: 14px;
}

.zoom-lightbox-nav-btn.next {
  right: 14px;
}

/* Barra inferior com mini-controles */
.zoom-lightbox-bottombar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 10;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

.zoom-lightbox-btn-pill {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.zoom-lightbox-btn-pill:hover,
.zoom-lightbox-btn-pill:active {
  background: rgba(255, 255, 255, 0.32);
}
