/**
 * HillsongCarousel
 * ----------------------------------------------
 *
 * Styles for the reusable carousel component
 * Extracted from the image gallery modal for broader use
 *
 */

/* Base carousel container */
.hillsong-carousel-container {
  width: 100%;
  height: 100%;
  display: flex;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  cursor: grab;
  touch-action: pan-x;
  position: relative;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.hillsong-carousel-container::-webkit-scrollbar {
  display: none;
}

.hillsong-carousel-container:active {
  cursor: grabbing;
}

/* Carousel slide */
.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  box-sizing: border-box;
}

/* Standalone arrows removed - only pagination arrows are used now */

/* Image Gallery Strip arrows - restore original design */
.image-gallery-display-strip .carousel-arrow-left,
.image-gallery-display-strip .carousel-arrow-right {
  position: absolute;
  font-family: hillsong-icons;
  color: white;
  font-size: 250%;
  font-weight: 800;
  height: 100%;
  display: flex;
  align-items: center;
  top: 0;
  z-index: 10;
  opacity: 0;
  transition: all 0.3s ease;
  margin: 0;
  pointer-events: none;
  cursor: pointer;
}

.image-gallery-display-strip .carousel-arrow-left {
  left: 0;
}

.image-gallery-display-strip .carousel-arrow-right {
  right: 0;
}

@media (min-width: 769px) {
  .image-gallery-display-strip .carousel-arrow-left,
  .image-gallery-display-strip .carousel-arrow-right {
    font-size: 50px;
    margin: 0 1rem;
  }
}

.custom-colors .image-gallery-display-strip .carousel-arrow-left,
.custom-colors .image-gallery-display-strip .carousel-arrow-right {
  color: var(--carousel-controls-color);
}

/* Dot pagination */
.carousel-dot-pagination {
  display: flex;
  gap: 10px;
  background: rgba(60, 60, 60, 0.35);
  border-radius: 20px;
  padding: 4px 12px;
  z-index: 100;
  align-items: center;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.12);
  opacity: 0;
  transition: opacity 0.2s;
  height: 32px;
  min-width: 32px;
  position: relative;
  margin-top: 10px;
}

.carousel-dot-pagination.visible {
  opacity: 1;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.2s, width 0.2s;
  display: inline-block;
  cursor: pointer;
}

.carousel-dot.active {
  background: #fff;
  width: 24px;
  border-radius: 8px;
}

/* Arrows within dot pagination */
.carousel-dot-pagination .carousel-arrow-left,
.carousel-dot-pagination .carousel-arrow-right {
  position: static;
  margin: 0 2px;
  color: white;
  opacity: 1;
  z-index: 200;
  background: none;
  box-shadow: none;
  align-items: center;
  display: flex;
  height: 18px;
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  cursor: pointer;
  transition: color 0.2s, opacity 0.2s, background 0.2s;
  transform: none;
  border-radius: 0;
}

.carousel-dot-pagination .carousel-arrow-left svg,
.carousel-dot-pagination .carousel-arrow-right svg {
  width: 16px;
  height: 16px;
}

.carousel-dot-pagination .carousel-arrow-left.disabled,
.carousel-dot-pagination .carousel-arrow-right.disabled {
  color: rgba(255, 255, 255, 0.5);
  cursor: default;
  pointer-events: none;
}

/* Video-specific carousel styles */
.carousel-video .carousel-slide {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.carousel-container-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.video-carousel-container {
  width: 100%;
}

.video-carousel-dot-pagination {
  display: flex;
  gap: 10px;
  background: rgba(60, 60, 60, 0.8);
  border-radius: 20px;
  padding: 4px 12px;
  z-index: 100;
  align-items: center;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.12);
  opacity: 0;
  transition: opacity 0.2s;
  height: 32px;
  min-width: 32px;
  position: relative;
  margin-top: 10px;
}

.video-carousel-dot-pagination.visible {
  opacity: 1;
}

.video-carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.2s, width 0.2s;
  display: inline-block;
  cursor: pointer;
}

.video-carousel-dot.active {
  background: #fff;
  width: 24px;
  border-radius: 8px;
}

.video-carousel-dot-pagination .video-carousel-arrow-left,
.video-carousel-dot-pagination .video-carousel-arrow-right {
  position: static;
  margin: 0 2px;
  color: white;
  fill: white;
  opacity: 1;
  z-index: 200;
  background: none;
  box-shadow: none;
  align-items: center;
  display: flex;
  height: 18px;
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  cursor: pointer;
  transition: color 0.2s, opacity 0.2s, background 0.2s;
  transform: none;
  border-radius: 0;
}

.video-carousel-dot-pagination .video-carousel-arrow-left svg,
.video-carousel-dot-pagination .video-carousel-arrow-right svg {
  width: 16px;
  height: 16px;
}

.video-carousel-dot-pagination .video-carousel-arrow-left svg path,
.video-carousel-dot-pagination .video-carousel-arrow-right svg path {
   stroke-width: 4px;
   stroke-linecap: round;
}


.video-carousel-dot-pagination .video-carousel-arrow-left.disabled,
.video-carousel-dot-pagination .video-carousel-arrow-right.disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.carousel-video .carousel-slide .fluidVideo {
  width: 100%;
  max-width: 100%;
  position: relative;
  height: 100%;
  overflow: hidden;
  padding: 0;
}

.carousel-video .carousel-slide .fluidVideo iframe {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 19 / 9;
  margin: 0 auto;
  object-fit: contain;
  border: none;
}

.carousel-video .video-title {
  color: white;
  font-size: 18px;
  font-weight: bold;
  margin: 16px 0 8px 0;
  text-align: center;
}

.carousel-video .video-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin: 8px 0;
  text-align: center;
}

.carousel-video .slideshow-caption {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin-top: 8px;
  text-align: center;
}

/* Responsive styles */
@media (max-width: 600px) {
  .carousel-dot-pagination {
    height: 32px;
    min-width: 32px;
    border-radius: 16px;
    padding: 2px 6px;
  }

  .carousel-arrow-left,
  .carousel-arrow-right {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 16px;
    font-size: 16px;
  }

  .carousel-arrow-left svg,
  .carousel-arrow-right svg {
    width: 18px;
    height: 18px;
  }
}

@media (min-width: 769px) {
  .carousel-arrow-left,
  .carousel-arrow-right {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    border-radius: 25px;
    font-size: 24px;
  }

  .carousel-arrow-left svg,
  .carousel-arrow-right svg {
    width: 24px;
    height: 24px;
  }

  .carousel-video .video-title {
    font-size: 24px;
  }

  .carousel-video .video-text {
    font-size: 16px;
  }

  .carousel-video .slideshow-caption {
    font-size: 16px;
  }
}

/* Theme-specific color overrides */
.white .carousel-dot-pagination {
  background: rgba(70, 70, 70, 0.8);
}

.white .carousel-arrow-left svg,
.white .carousel-arrow-right svg {
  fill: white;
}

.white .carousel-dot {
  background: rgba(70, 70, 70, 0.5);
}

.white .carousel-dot.active {
  background: #464646;
}

.grey .carousel-dot-pagination {
  background: rgba(70, 70, 70, 0.8);
}

.grey .carousel-arrow-left svg,
.grey .carousel-arrow-right svg {
  fill: white;
}

.darkgrey .carousel-arrow-left svg,
.darkgrey .carousel-arrow-right svg {
  fill: white;
}

.imgbg .carousel-arrow-left svg,
.imgbg .carousel-arrow-right svg {
  fill: white;
}

.custom-colors .carousel-arrow-left svg,
.custom-colors .carousel-arrow-right svg {
  fill: var(--carousel-controls-color, white);
}

.custom-colors .carousel-video .video-title {
  color: var(--title-color, white);
}

.custom-colors .carousel-video .video-text {
  color: var(--text-color, rgba(255, 255, 255, 0.8));
}

.custom-colors .carousel-video .slideshow-caption {
  color: var(--video-caption-color, rgba(255, 255, 255, 0.6));
}

.custom-colors .carousel-video .video-carousel-dot-pagination {
  background-color: var(--carousel-controls-color, white);
}

.custom-colors .carousel-video .video-carousel-dot,
.custom-colors .carousel-video .video-carousel-dot.active {
  background-color: var(--bg-color, white);
}

.custom-colors .carousel-video .video-carousel-arrow-left,
.custom-colors .carousel-video .video-carousel-arrow-right {
  fill: var(--bg-color, white);
  color: var(--bg-color, white);
}

/* Image Slides Carousel styles */
.carousel-image-slides .carousel-slide {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.image-slides-carousel-container {
    width: 100%;
}

.carousel-image-slides .carousel-slide .image-frame {
    width: 100%;
    max-width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.carousel-image-slides .carousel-slide .image-frame img {
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.carousel-image-slides.image-gallery-size-small .carousel-slide .image-frame img{
  max-height: 20vh;
}

.carousel-image-slides.image-gallery-size-medium .carousel-slide .image-frame img{
  max-height: 40vh;
}

.carousel-image-slides.image-gallery-size-large .carousel-slide .image-frame img{
  max-height: 60vh;
}
.carousel-image-slides .photo-gallery-caption {
    color: white;
    font-size: 16px;
    font-weight: bold;
    margin: 16px 0 8px 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 4px;
    margin-top: 16px;
}

.image-slides-carousel-dot-pagination {
    display: flex;
    gap: 10px;
    background: rgba(60, 60, 60, 0.8);
    border-radius: 20px;
    padding: 4px 12px;
    z-index: 100;
    align-items: center;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.12);
    opacity: 0;
    transition: opacity 0.2s;
    height: 32px;
    min-width: 32px;
    position: relative;
    margin-top: 10px;
}

.image-slides-carousel-dot-pagination.visible {
    opacity: 1;
}

.image-slides-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: background 0.2s, width 0.2s;
    display: inline-block;
    cursor: pointer;
}

.image-slides-carousel-dot.active {
    background: #fff;
    width: 24px;
    border-radius: 8px;
}

.image-slides-carousel-dot-pagination .image-slides-carousel-arrow-left,
.image-slides-carousel-dot-pagination .image-slides-carousel-arrow-right {
    position: static;
    margin: 0 2px;
    color: white;
    fill: white;
    opacity: 1;
    z-index: 200;
    background: none;
    box-shadow: none;
    align-items: center;
    display: flex;
    height: 18px;
    width: 18px;
    min-width: 18px;
    min-height: 18px;
    cursor: pointer;
    transition: color 0.2s, opacity 0.2s, background 0.2s;
    transform: none;
    border-radius: 0;
}

.image-slides-carousel-dot-pagination .image-slides-carousel-arrow-left svg,
.image-slides-carousel-dot-pagination .image-slides-carousel-arrow-right svg {
    width: 16px;
    height: 16px;
}

.image-slides-carousel-dot-pagination .image-slides-carousel-arrow-left svg path,
.image-slides-carousel-dot-pagination .image-slides-carousel-arrow-right svg path {
    stroke-width: 4px;
    stroke-linecap: round;
}

.image-slides-carousel-dot-pagination .image-slides-carousel-arrow-left.disabled,
.image-slides-carousel-dot-pagination .image-slides-carousel-arrow-right.disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

/* Responsive styles for image slides */
@media (max-width: 600px) {
    
    .carousel-image-slides .carousel-slide .image-frame img {
        max-height: 60vh;
    }
    
    .carousel-image-slides .photo-gallery-caption {
        font-size: 14px;
        margin-top: 12px;
        padding: 6px 12px;
    }
}

@media (min-width: 769px) {
    .carousel-image-slides .photo-gallery-caption {
        font-size: 18px;
        padding: 10px 20px;
    }
}

/* Theme-specific color overrides for image slides */
.custom-colors .carousel-image-slides .image-slides-carousel-dot-pagination {
    background-color: var(--carousel-controls-color, rgba(60, 60, 60, 0.8));
}

.custom-colors .carousel-image-slides .image-slides-carousel-dot,
.custom-colors .carousel-image-slides .image-slides-carousel-dot.active {
    background-color: var(--bg-color, white);
}

.custom-colors .carousel-image-slides .image-slides-carousel-arrow-left,
.custom-colors .carousel-image-slides .image-slides-carousel-arrow-right {
    fill: var(--bg-color, white);
    color: var(--bg-color, white);
}

.custom-colors .carousel-image-slides .photo-gallery-caption {
    color: var(--title-color, white);
    background: var(--carousel-controls-color, rgba(0, 0, 0, 0.7));
}