/**
 * Frontend Gallery Styles
 * 
 * Styles for gallery display on the frontend including lightbox.
 * 
 * @package FrameStack
 * @since   1.0.0
 */

/* ===========================
   Lightbox Overlay Styles
   =========================== */

.framestack-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.framestack-lightbox-overlay.active {
  display: flex;
  opacity: 1;
}

.framestack-lightbox-backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.framestack-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 10000;
  animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.framestack-lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  height: auto;
  width: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.framestack-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.framestack-lightbox-close:hover {
  background: rgba(0, 0, 0, 0.9);
}

.framestack-lightbox-close:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ===========================
   Responsive Adjustments
   =========================== */

@media (max-width: 768px) {
  .framestack-lightbox-content {
    max-width: 95vw;
    max-height: 85vh;
  }

  .framestack-lightbox-close {
    top: 10px;
    right: 10px;
    font-size: 24px;
    padding: 6px 12px;
  }
}

/* ===========================
   Gallery Slider Utilities
   =========================== */

.framestack-gallery-slider {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.framestack-gallery-slide img {
  pointer-events: auto;
}

.framestack-gallery-controls button {
  transition: all 0.2s ease;
}

.framestack-gallery-controls button:hover {
  transform: scale(1.1);
  box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.15);
}

.framestack-gallery-controls button:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.framestack-gallery-controls button:active {
  transform: scale(0.95);
}
