/* ===================================================================
   File: business-listing-premium-gallery.css
   Description: Premium photo gallery slider, navigation dots, controls, and lightbox presentation.
   Notes:
   - Depends on business-listing-shared.css and premium-gallery.js.
   =================================================================== */

/* =========================
   GALLERY
========================= */

.ll-premium-gallery-section {
  margin-top: 0;
}

.ll-gallery,
.ll-premium-gallery {
  margin-top: 1.5rem;
}

.ll-gallery-heading,
.ll-premium-gallery-heading {
  margin: 0 0 0.9rem;
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 800;
}

.carousel-empty {
  margin: 0;
  color: #64748b;
}

.ll-premium-gallery-slider__viewport {
  touch-action: pan-y;
  overflow: hidden;
  width: 100%;
  min-width: 0;
}

.ll-premium-gallery-slider__viewport,
.ll-premium-gallery-slider__track,
.ll-premium-gallery-slider__slide,
.ll-premium-gallery-slider__image {
  -webkit-user-select: none;
  user-select: none;
}

.ll-premium-gallery-slider__image {
  -webkit-user-drag: none;
}

/* =========================
   SLIDER SHELL
========================= */

.ll-premium-gallery-slider-shell {
  position: relative;
}

.ll-premium-gallery-slider {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ll-premium-gallery-slider__track {
  display: flex;
  gap: 14px;
  transition: transform 0.28s ease;
  will-change: transform;
}

.ll-premium-gallery-slider__track.is-no-transition {
  transition: none;
}

.ll-premium-gallery-slider__slide {
  flex: 0 0 calc((100% - 42px) / 4);
  min-width: 0;
}

/* =========================
   IMAGE CARD
========================= */

.ll-premium-gallery-slider__link {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  text-decoration: none;
}

.ll-premium-gallery-slider__image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.ll-premium-gallery-slider__link:hover .ll-premium-gallery-slider__image {
  transform: scale(1.02);
}

/* =========================
   LIGHTBOX
========================= */

body.ll-lightbox-open {
  overflow: hidden;
}

.ll-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.88);
}

.ll-lightbox-inner {
  position: relative;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ll-lightbox-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 16px;
  background: #111827;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

.ll-lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 1.45rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

.ll-lightbox-close:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.ll-lightbox-close:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(26, 115, 232, 0.18),
    0 4px 14px rgba(0, 0, 0, 0.18);
}

@media (max-width: 640px) {
  .ll-lightbox-overlay {
    padding: 12px;
  }

  .ll-lightbox-close {
    top: -8px;
    right: -8px;
    width: 38px;
    height: 38px;
  }
}

/* =========================
   NAV BUTTONS
========================= */

.ll-premium-gallery-slider__nav {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid #dadce0;
  border-radius: 999px;
  background: #ffffff;
  color: #202124;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.2);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}

.ll-premium-gallery-slider__nav:hover {
  background: #f8f9fa;
  border-color: #c6cacc;
  transform: translateY(-1px);
}

.ll-premium-gallery-slider__nav:focus-visible {
  outline: none;
  border-color: #1a73e8;
  box-shadow:
    0 0 0 3px rgba(26, 115, 232, 0.18),
    0 1px 3px rgba(60, 64, 67, 0.2);
}

.ll-premium-gallery-slider__nav[disabled] {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

/* =========================
   DOTS
========================= */

.ll-premium-gallery-slider__dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ll-premium-gallery-slider__dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #d1d5db;
  cursor: pointer;
  padding: 0;
  transition:
    background-color 0.15s ease,
    transform 0.15s ease;
}

.ll-premium-gallery-slider__dot:hover {
  background: #9ca3af;
}

.ll-premium-gallery-slider__dot[aria-current="true"] {
  background: #1a73e8;
  transform: scale(1.1);
}

/* =========================
   MOBILE / TABLET
========================= */

@media (max-width: 1100px) {
  .ll-premium-gallery-slider__slide {
    flex: 0 0 calc((100% - 14px) / 2);
  }
}

@media (max-width: 640px) {
  .ll-premium-gallery-slider {
    gap: 0;
  }

  .ll-premium-gallery-slider__slide {
    flex: 0 0 100%;
  }

  .ll-premium-gallery-slider__nav {
    width: 34px;
    height: 34px;
    opacity: 0.7;
  }

  .ll-premium-gallery-slider__image {
    aspect-ratio: 4 / 3;
  }

  .ll-premium-gallery-slider__dots {
    gap: 10px;
    margin-top: 14px;
  }

  .ll-premium-gallery-slider__dot {
    width: 12px;
    height: 12px;
  }
}
