/*!********************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/common/styles/carousel.scss ***!
  \********************************************************************************************************************************************************************************************************************************************************/
/**
 * Carousel Styles
 *
 * Styles for the before/after image slider carousel layout using Swiper v12 Web Components.
 *
 * @package wp-before-after-image-slider
 * @since 2.1.0
 */
/* Carousel Wrapper */
.bais-carousel-wrapper {
  position: relative;
  width: 100%;
  margin: 20px 0;
}

/* Swiper Web Component Container */
swiper-container.bais-carousel {
  width: 100%;
  overflow: hidden;
  padding-bottom: 40px; /* Space for pagination */
  /* CSS Custom Properties for Swiper Styling (passed through shadow DOM) */
  --swiper-navigation-color: #2271b1;
  --swiper-navigation-size: 20px;
  --swiper-pagination-color: #2271b1;
  --swiper-pagination-bullet-size: 12px;
  --swiper-pagination-bullet-inactive-color: #c3c4c7;
  --swiper-pagination-bullet-inactive-opacity: 1;
  --swiper-pagination-bullet-horizontal-gap: 6px;
  --swiper-theme-color: #2271b1;
}

/* Carousel Slide */
swiper-slide .bais-carousel-slide {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Force sliders to take proper dimensions inside carousel */
swiper-slide .bais-carousel-slide .coca-bais-shortcode {
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}

/* Force slider containers to take proper dimensions */
swiper-slide .bais-carousel-slide .coca-bais-container {
  max-width: fit-content;
  position: relative !important;
  overflow: hidden !important;
  margin: 0 auto !important;
}

/* When carousel has fixed dimensions, respect them */
swiper-slide .bais-carousel-slide .coca-bais-container[data-carousel-fixed=true] {
  /* Dimensions set via inline style - don't override */
}

swiper-slide .bais-carousel-slide .coca-bais-caption-wrapper {
  margin: 0 auto !important;
}

/* Only use auto dimensions when not carousel-fixed */
swiper-slide .bais-carousel-slide .coca-bais-container:not([data-carousel-fixed=true]) {
  width: auto;
  height: auto;
}

swiper-slide .bais-carousel-slide .coca-bais-container[id^=video-slider-] {
  height: 360px !important;
  min-height: auto !important;
  aspect-ratio: initial !important;
}

swiper-slide .bais-carousel-slide .coca-bais-triple-container {
  max-width: none !important;
  height: auto !important;
  position: relative !important;
  overflow: visible !important;
  margin: 0 auto !important;
}

/* Let triple slider images calculate naturally - don't force dimensions */
swiper-slide .bais-carousel-slide .coca-bais-triple-container .coca-bais-image {
  /* No dimension constraints - let triple slider plugin handle sizing */
}

/* Default slider images - respect inline styles when set */
swiper-slide .bais-carousel-slide .coca-bais-container .coca-bais-image {
  max-width: 100%;
  display: block !important;
}

/* when lazy loading, skeleton image height will be 100% of container height, so ensure it doesn't exceed natural image height */
swiper-slide .bais-carousel-slide .coca-bais-container .coca-bais-image.coca-bais-lazy-loading {
  height: 100%;
}

/* Only use auto dimensions for images when container isn't fixed */
swiper-slide .bais-carousel-slide .coca-bais-container:not([data-carousel-fixed=true]) .coca-bais-image {
  width: auto;
  height: auto;
}

/* Fix overlay to match container size */
swiper-slide .bais-carousel-slide .coca-image-compare-overlay {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  pointer-events: none !important;
}

/* Ensure overlay labels can receive pointer events */
swiper-slide .bais-carousel-slide .coca-image-compare-before-label,
swiper-slide .bais-carousel-slide .coca-image-compare-after-label {
  pointer-events: auto !important;
}

/* Fix triple slider overlay */
swiper-slide .bais-carousel-slide .coca-bais-triple-container .overlay {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* Ensure labels stay inside container */
swiper-slide .bais-carousel-slide .coca-image-compare-before-label,
swiper-slide .bais-carousel-slide .coca-image-compare-after-label,
swiper-slide .bais-carousel-slide .label {
  position: absolute !important;
}

/* Ensure sliders fit within carousel slides */
swiper-slide .bais-carousel-slide .image-compare,
swiper-slide .bais-carousel-slide .image-compare-triple {
  max-width: 100%;
  margin: 0 auto;
}

/* Custom Navigation Button Styling */
swiper-container.bais-carousel::part(button-next),
swiper-container.bais-carousel::part(button-prev) {
  background: rgba(255, 255, 255, 0.9);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

swiper-container.bais-carousel::part(button-next):hover,
swiper-container.bais-carousel::part(button-prev):hover {
  background: #2271b1;
  color: #fff;
  box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

/* Pagination Custom Styling */
swiper-container.bais-carousel::part(bullet) {
  transition: all 0.3s ease;
}

swiper-container.bais-carousel::part(bullet-active) {
  width: 24px;
  border-radius: 6px;
}

/* Error Message */
.bais-carousel-error {
  padding: 20px;
  background: #fff8e5;
  border: 1px solid #f0b849;
  border-radius: 4px;
  color: #8a6d3b;
  text-align: center;
  font-size: 14px;
  margin: 20px 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  swiper-container.bais-carousel {
    --swiper-navigation-size: 16px;
    --swiper-pagination-bullet-size: 10px;
  }
  swiper-container.bais-carousel::part(button-next),
  swiper-container.bais-carousel::part(button-prev) {
    width: 36px;
    height: 36px;
  }
}
@media (max-width: 480px) {
  swiper-container.bais-carousel {
    --swiper-navigation-size: 14px;
  }
  swiper-container.bais-carousel::part(button-next),
  swiper-container.bais-carousel::part(button-prev) {
    width: 32px;
    height: 32px;
    opacity: 0.5;
  }
}
/* Loading State */
.bais-carousel-wrapper.loading {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bais-carousel-wrapper.loading::after {
  content: "";
  width: 48px;
  height: 48px;
  border: 4px solid #f0f0f1;
  border-top-color: #2271b1;
  border-radius: 50%;
  animation: bais-spin 0.8s linear infinite;
}

@keyframes bais-spin {
  to {
    transform: rotate(-360deg);
  }
}
/* Fix for video sliders in carousel */
swiper-slide .bais-carousel-slide video {
  max-width: 100%;
  height: auto;
}

/* Ensure swiper-slide elements display properly */
swiper-slide {
  height: auto !important;
  min-height: 200px;
  display: flex !important;
  align-items: stretch !important;
  box-sizing: border-box;
}

/* Additional spacing and layout */
.bais-carousel-wrapper {
  padding: 10px 0;
}

/* Ensure wrapper containers inside slides */
swiper-slide .coca-image-compare-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: hidden !important;
}

swiper-slide .coca-image-compare-triple-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  overflow: visible !important;
}

/* Triple slider container centers itself */
swiper-slide .coca-bais-triple-container {
  margin: 0 auto !important;
}

/* Ensure shortcode container provides sizing context */
swiper-slide .coca-bais-shortcode .shortcode-container {
  width: 100% !important;
  max-width: 100% !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: visible !important;
}
