/* ==========================================================================
   Petrekivka2 — Lightbox Component
   ========================================================================== */

.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(26, 20, 15, 0.95); /* Темний теплий фон */
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

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

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-sm);
  transform: scale(0.95);
  transition: transform var(--transition-spring);
}

.lightbox-overlay.is-open .lightbox-image {
  transform: scale(1);
}

/* Controls */
.lightbox-btn {
  position: absolute;
  background: transparent;
  border: none;
  color: var(--color-text-inverse);
  cursor: pointer;
  padding: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), transform var(--transition-fast);
  opacity: 0.7;
}

.lightbox-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.lightbox-btn svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.lightbox-close {
  top: var(--space-4);
  right: var(--space-4);
}

.lightbox-prev {
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover {
  transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next:hover {
  transform: translateY(-50%) scale(1.1);
}

@media (max-width: 768px) {
  .lightbox-btn svg {
    width: 24px;
    height: 24px;
  }
  .lightbox-prev {
    left: 0;
  }
  .lightbox-next {
    right: 0;
  }
}
