/**
 * Banner Slides — Carousel Styles
 *
 * Heights are driven by CSS custom properties set inline via PHP:
 *   --bs-h-desktop, --bs-h-tablet, --bs-h-mobile
 *
 * @package BannerSlides
 */

/* ═══════════════════════════════════════════════════════════════════
   BASE CAROUSEL
   ═══════════════════════════════════════════════════════════════════ */

.bs-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: var(--bs-h-desktop);
}

.bs-carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ═══════════════════════════════════════════════════════════════════
   SLIDES
   ═══════════════════════════════════════════════════════════════════ */

.bs-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* ─── Slide link overlay ───────────────────────────────────────── */

.bs-slide-link {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  text-decoration: none;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════
   FADE TRANSITION
   ═══════════════════════════════════════════════════════════════════ */

.bs-transition-fade .bs-slide {
  opacity: 0;
  z-index: 0;
  transition: opacity var(--bs-transition-speed, 500ms) ease;
}

.bs-transition-fade .bs-slide--active {
  opacity: 1;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════
   SLIDE TRANSITION
   ═══════════════════════════════════════════════════════════════════ */

.bs-transition-slide .bs-slide {
  opacity: 1;
  z-index: 0;
  transition: transform var(--bs-transition-speed, 500ms) ease;
}

.bs-transition-slide .bs-slide--active {
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════
   NAVIGATION ARROWS
   ═══════════════════════════════════════════════════════════════════ */

.bs-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
  opacity: 0;
  padding: 0;
  line-height: 1;
}

.bs-arrow svg {
  display: block;
  width: 20px;
  height: 20px;
}

.bs-carousel:hover .bs-arrow {
  opacity: 1;
}

.bs-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.bs-arrow:focus-visible {
  opacity: 1;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.bs-arrow--prev {
  left: 12px;
}

.bs-arrow--next {
  right: 12px;
}

/* ─── Smaller arrows for compact banners ───────────────────────── */

.bs-carousel--city .bs-arrow,
.bs-carousel--loc .bs-arrow {
  width: 28px;
  height: 28px;
}

.bs-carousel--city .bs-arrow svg,
.bs-carousel--loc .bs-arrow svg {
  width: 14px;
  height: 14px;
}

.bs-carousel--city .bs-arrow--prev,
.bs-carousel--loc .bs-arrow--prev {
  left: 6px;
}

.bs-carousel--city .bs-arrow--next,
.bs-carousel--loc .bs-arrow--next {
  right: 6px;
}

/* ═══════════════════════════════════════════════════════════════════
   DOT INDICATORS
   ═══════════════════════════════════════════════════════════════════ */

.bs-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.bs-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.bs-dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

.bs-dot--active {
  background: #fff;
  border-color: #fff;
}

.bs-dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ─── Smaller dots for compact banners ─────────────────────────── */

.bs-carousel--city .bs-dots,
.bs-carousel--loc .bs-dots {
  bottom: 6px;
  gap: 6px;
}

.bs-carousel--city .bs-dot,
.bs-carousel--loc .bs-dot {
  width: 7px;
  height: 7px;
  border-width: 1px;
}

/* ═══════════════════════════════════════════════════════════════════
   SINGLE SLIDE — disable carousel UI chrome
   ═══════════════════════════════════════════════════════════════════ */

.bs-carousel--city {
  margin-bottom: 20px;
}

/* ─── Filter toggle alignment (city/search pages) ──────────────── */

.locations-listing--filter-display-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.5rem 0 15px;
}

.bs-carousel--single .bs-arrow,
.bs-carousel--single .bs-dots {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════ */

.bs-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bs-carousel:focus {
  outline: none;
}

.bs-carousel:focus-visible {
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════ */

/* Tablet: max-width 1200px */
@media (max-width: 1200px) {
  .bs-carousel {
    height: var(--bs-h-tablet);
  }
}

/* Mobile: max-width 768px */
@media (max-width: 768px) {
  .bs-carousel {
    height: var(--bs-h-mobile);
  }

  .bs-arrow {
    width: 32px;
    height: 32px;
    opacity: 1; /* Always visible on touch devices */
  }

  .bs-arrow svg {
    width: 16px;
    height: 16px;
  }

  .bs-arrow--prev {
    left: 8px;
  }

  .bs-arrow--next {
    right: 8px;
  }

  .bs-carousel--city .bs-arrow,
  .bs-carousel--loc .bs-arrow {
    width: 24px;
    height: 24px;
  }

  .bs-carousel--city .bs-arrow svg,
  .bs-carousel--loc .bs-arrow svg {
    width: 12px;
    height: 12px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   HOMEPAGE BANNER WRAP
   ═══════════════════════════════════════════════════════════════════ */

.bs-home-banner-wrap {
  position: relative;
  overflow: hidden;
}

.home .bs-home-banner-wrap.feature_banner {
  height: auto;
  display: block;
}

.home .bs-home-banner-wrap .bs-home-cta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
}

.home .bs-home-banner-wrap .bs-home-cta .row {
  padding-top: 0;
  padding-bottom: 0;
}

@media (max-width: 767px) {
  .home .bs-home-banner-wrap {
    overflow: visible;
  }

  .home .bs-home-banner-wrap .bs-home-cta {
    position: static;
    background-color: #393939;
  }

  .home .find_storage.find_storage_mobile {
    margin-top: 0;
  }
}
