/* ==========================================================================
   Property Preview — Slideshow
   Full-screen image/video slideshow overlay with navigation, thumbnails,
   and slide transition animations.
   ========================================================================== */

body.property-preview-slideshow-open {
  overflow: hidden;
}

.property-preview-slideshow {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(8, 15, 31, 0.93);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 5vw, 4rem) clamp(3.5rem, 6vh, 5rem);
  gap: clamp(1.25rem, 3vw, 2rem);
  z-index: 1080;
}

.property-preview-slideshow[hidden] {
  display: none;
}

.property-preview-slideshow__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(1200px, 90vw);
  max-height: calc(100vh - 220px);
  z-index: 1;
}

.property-preview-slideshow__picture {
  display: flex;
  align-items: center;
  justify-content: center;
}

.property-preview-slideshow__image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 90vw);
  max-height: 100%;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  object-fit: contain;
  will-change: transform;
}

/* Video in slideshow */
.property-preview-slideshow__stage video[data-slideshow-video] {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 90vw);
  max-height: calc(100vh - 220px);
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  background-color: #000;
}

.property-preview-slideshow__stage[data-transition='next'] .property-preview-slideshow__image {
  animation: property-preview-slideshow-slide-next 0.34s ease both;
}

.property-preview-slideshow__stage[data-transition='prev'] .property-preview-slideshow__image {
  animation: property-preview-slideshow-slide-prev 0.34s ease both;
}

.property-preview-slideshow__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.24s ease, background-color 0.24s ease;
  z-index: 3;
}

.property-preview-slideshow__nav .material-icons-outlined {
  font-size: 2.125rem;
}

.property-preview-slideshow__nav--prev {
  left: clamp(1rem, 5vw, 3.5rem);
}

.property-preview-slideshow__nav--next {
  right: clamp(1rem, 5vw, 3.5rem);
}

.property-preview-slideshow__nav:hover,
.property-preview-slideshow__nav:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.08);
  outline: none;
}

.property-preview-slideshow__close {
  position: fixed;
  top: clamp(1rem, 4vw, 2.5rem);
  right: clamp(1rem, 4vw, 2.5rem);
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.24s ease, background-color 0.24s ease;
  z-index: 3;
}

.property-preview-slideshow__close:hover,
.property-preview-slideshow__close:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
  outline: none;
}

.property-preview-slideshow__counter {
  position: fixed;
  top: clamp(1rem, 4vw, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  z-index: 3;
}

.property-preview-slideshow__counter:empty {
  display: none;
}

@keyframes property-preview-slideshow-slide-next {
  0% {
    transform: translate3d(6%, 0, 0) scale(0.995);
    opacity: 0;
  }

  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}

@keyframes property-preview-slideshow-slide-prev {
  0% {
    transform: translate3d(-6%, 0, 0) scale(0.995);
    opacity: 0;
  }

  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .property-preview-slideshow__stage[data-transition] .property-preview-slideshow__image {
    animation: none;
  }
}

@media (max-width: 575.98px) {
  .property-preview-slideshow {
    padding-bottom: clamp(2.75rem, 9vh, 4.5rem);
  }

  .property-preview-slideshow__nav {
    width: 48px;
    height: 48px;
  }
}
