/* ==========================================================================
   CUSTOM GALLERY LIGHTBOX - UTARY HERITAGE CLASSIC EDITION
   - Harmonized Theme: Coklat Elegan #44291f + Emas Antik #CCBA82
   - Navigasi: Circular Gold Heritage Medallions (No Generic Square / Red Box)
   - Smooth Touch Swipe Carousel + Compact Responsive Mobile Arrows
   ========================================================================== */

.custom-lightbox-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  background-color: rgba(18, 10, 7, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  display: flex !important;
  flex-direction: column !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  user-select: none;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.custom-lightbox-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Slider & Track */
.custom-lightbox-slider {
  position: relative !important;
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  touch-action: pan-y pinch-zoom;
}

.custom-lightbox-track {
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  will-change: transform;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  touch-action: pan-y pinch-zoom;
}

.custom-lightbox-slide {
  width: 100vw !important;
  height: 100vh !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 60px 40px !important;
  box-sizing: border-box !important;
}

.custom-lightbox-img {
  max-width: 90vw !important;
  max-height: 80vh !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85) !important;
  border: 1px solid rgba(204, 186, 130, 0.45) !important;
  display: block !important;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

/* Header & Counter (Heritage Gold Pill) */
.custom-lightbox-header {
  position: absolute !important;
  top: 18px !important;
  left: 20px !important;
  right: 20px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  z-index: 1000001 !important;
  pointer-events: none !important;
}

.custom-lightbox-counter {
  pointer-events: auto !important;
  color: #CCBA82 !important;
  font-family: var(--utary-font-secondary, "Ovo", serif) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  background: rgba(44, 25, 18, 0.92) !important;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  border: 1.5px solid #CCBA82 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
}

/* Close Button - Authentic Circular Heritage Medallion */
button.custom-lightbox-close,
.custom-lightbox-close {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  pointer-events: auto !important;
  background: rgba(44, 25, 18, 0.92) !important;
  border: 1.5px solid #CCBA82 !important;
  color: #CCBA82 !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  transition: all 0.22s ease !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6) !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  box-sizing: border-box !important;
  z-index: 1000002 !important;
}

button.custom-lightbox-close svg,
.custom-lightbox-close svg {
  display: block !important;
  stroke: #CCBA82 !important;
  transition: stroke 0.2s ease !important;
}

button.custom-lightbox-close:hover,
.custom-lightbox-close:hover {
  background: #CCBA82 !important;
  color: #2e201a !important;
  border-color: #CCBA82 !important;
  transform: scale(1.08) !important;
}

button.custom-lightbox-close:hover svg,
.custom-lightbox-close:hover svg {
  stroke: #2e201a !important;
}

/* Prev / Next Nav Buttons - Sleek Circular Gold Heritage Badges */
button.custom-lightbox-nav,
.custom-lightbox-nav {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: rgba(44, 25, 18, 0.92) !important;
  border: 1.5px solid #CCBA82 !important;
  color: #CCBA82 !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 1000002 !important;
  transition: all 0.22s ease !important;
  line-height: 1 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65) !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  box-sizing: border-box !important;
}

button.custom-lightbox-nav svg,
.custom-lightbox-nav svg {
  display: block !important;
  stroke: #CCBA82 !important;
  transition: stroke 0.2s ease !important;
}

button.custom-lightbox-nav:hover,
.custom-lightbox-nav:hover {
  background: #CCBA82 !important;
  color: #2e201a !important;
  border-color: #CCBA82 !important;
  transform: translateY(-50%) scale(1.08) !important;
}

button.custom-lightbox-nav:hover svg,
.custom-lightbox-nav:hover svg {
  stroke: #2e201a !important;
}

button.custom-lightbox-nav:active,
.custom-lightbox-nav:active {
  transform: translateY(-50%) scale(0.94) !important;
}

button.custom-lightbox-prev,
.custom-lightbox-prev {
  left: 20px !important;
}

button.custom-lightbox-next,
.custom-lightbox-next {
  right: 20px !important;
}

/* ==========================================================================
   TAMPILAN MOBILE (HP)
   - Navigasi Panah Circular Compact & Rapi di Tepi Kiri/Kanan
   - Area Foto Luas & Dapat Di-slide dengan Sentuhan Jari
   ========================================================================== */
@media (max-width: 600px) {
  .custom-lightbox-slide {
    padding: 65px 8px 35px 8px !important;
  }
  .custom-lightbox-img {
    max-width: 95vw !important;
    max-height: 75vh !important;
    border-radius: 6px !important;
  }
  button.custom-lightbox-nav,
  .custom-lightbox-nav {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    font-size: 15px !important;
    border-radius: 50% !important;
    background: rgba(44, 25, 18, 0.94) !important;
    border: 1.5px solid #CCBA82 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65) !important;
  }
  button.custom-lightbox-prev,
  .custom-lightbox-prev {
    left: 8px !important;
  }
  button.custom-lightbox-next,
  .custom-lightbox-next {
    right: 8px !important;
  }
  .custom-lightbox-header {
    top: 14px !important;
    left: 14px !important;
    right: 14px !important;
  }
  .custom-lightbox-counter {
    font-size: 12px !important;
    padding: 5px 12px !important;
  }
  button.custom-lightbox-close,
  .custom-lightbox-close {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    border-radius: 50% !important;
  }
}
