/* FTM Carousel Styles */

/* Editor Styles
 * =================================== */
/* Only visible in editor */
.only-in-editor {
  display: none;
}

/* Carousel Wrapper */
.carousel-wrapper {
  position: relative;
  overflow-x: visible;
  display: flex;
  flex-direction: column;
  padding: 0 50px;
  margin-top: 1rem!important;
  margin-bottom: 2rem!important;
}

/* ACF Carousel Settings
 * ----------------------------------- */
.acf-field-ftm-carousel-hide-scrollbar,
.acf-field-ftm-carousel-show-thumbnails,
.acf-field-ftm-carousel-visible-count,
.acf-field-ftm-carousel-gap,
.acf-field-ftm-carousel-show-controls,
.acf-field-ftm-carousel-control-position,
.acf-field-ftm-carousel-thumbnail-count,
.acf-field-ftm-carousel-fullwidth {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #f5f5f5;
  padding: 10px;
  gap: 0.10em;
  border-left: 4px solid #e0dfdf !important;
  border-top: 4px solid #e0dfdf !important;
  border-bottom: 4px solid #e0dfdf !important;
}

/* ACF Field Border and Label Styles */
.acf-field-ftm-carousel-show-controls,
.acf-field-ftm-carousel-control-position {
  border-left: 4px solid #e0dfdf !important;
}

/* ACF Field Label Styles */
.acf-field-ftm-carousel-hide-scrollbar .acf-label,
.acf-field-ftm-carousel-show-thumbnails .acf-label,
.acf-field-ftm-carousel-visible-count .acf-label,
.acf-field-ftm-carousel-gap .acf-label,
.acf-field-ftm-carousel-show-controls .acf-label,
.acf-field-ftm-carousel-control-position .acf-label,
.acf-field-ftm-carousel-thumbnail-count .acf-label,
.acf-field-ftm-carousel-fullwidth .acf-label {
  margin: 0 0 5px 0 !important;
  font-weight: bold;
  font-size: 12px;
  border-bottom: 4px solid #e0dfdf !important;
}

/* ACF Field Label Display */
.acf-field-ftm-carousel-hide-scrollbar .acf-label label,
.acf-field-ftm-carousel-show-thumbnails .acf-label label,
.acf-field-ftm-carousel-visible-count .acf-label label,
.acf-field-ftm-carousel-gap .acf-label label {
  margin: 0;
  display: block;
}

/* ACF Scrollbar Input */
.acf-field-ftm-carousel-hide-scrollbar .acf-input {
  margin: 0;
}

/* ACF Hide Scrollbar Toggle */
.acf-field-ftm-carousel-hide-scrollbar .acf-true-false {
  display: flex;
  align-items: center;
}

/* ACF Switch Styles */
.acf-field-ftm-carousel-hide-scrollbar .acf-switch {
  margin-left: 0;
}

.acf-switch-input:checked+.acf-switch .acf-switch-slider {
  background-color: #016796;
}

.acf-switch-on,
.acf-switch-off {
  font-size: 12px;
  font-weight: bold;
}

.acf-switch-slider {
  border-radius: 999px;
}

/* ACF Full Width Styles */
.acf-field-ftm-carousel-visible-count .acf-input,
.acf-field-ftm-carousel-visible-count .select2-container,
.acf-field-ftm-carousel-visible-count .select2-selection,
.acf-field-ftm-carousel-visible-count .select2-selection__rendered,
.acf-field-ftm-carousel-gap .acf-input,
.acf-field-ftm-carousel-gap .select2-container,
.acf-field-ftm-carousel-gap .select2-selection,
.acf-field-ftm-carousel-gap .select2-selection__rendered,
.acf-field-ftm-carousel-thumbnail-count .acf-input,
.acf-field-ftm-carousel-thumbnail-count .select2-container,
.acf-field-ftm-carousel-thumbnail-count .select2-selection,
.acf-field-ftm-carousel-thumbnail-count .select2-selection__rendered {
  width: 100% !important;
  max-width: 100% !important;
  display: block;
  box-sizing: border-box;
}

/* ACF Field Padding */
.acf-field-ftm-carousel-visible-count .select2-selection,
.acf-field-ftm-carousel-gap .select2-selection {
  padding: 0 8px !important;
}

/* ACF Field Rendered Styles */
.acf-field-ftm-carousel-visible-count .select2-selection__rendered,
.acf-field-ftm-carousel-gap .select2-selection__rendered {
  white-space: normal !important;
  overflow: visible !important;
}

/* ACF Lightbox Enable Styles */
.acf-field-ftm-carousel-enable-lightbox {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: center;
  padding: 1rem 0;
  border-bottom: 4px solid #e0dfdf !important;
}

/* ACF Lightbox Label */
.acf-field-ftm-carousel-enable-lightbox .acf-label {
  margin: 0 1rem 0 0 !important;
  font-weight: bold;
  font-size: 13px;
}

/* ACF Lightbox Input */
.acf-field-ftm-carousel-enable-lightbox .acf-input {
  margin: 0;
}

/* ACF Button Color Picker */
.acf-field-ftm-carousel-btn-color,
.acf-field-ftm-carousel-btn-hover-color {
  display: flex;
  flex-direction: column;
  /* label on top */
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 4px solid #e0dfdf !important;
  text-align: center;
}

/* ACF Button Color Label */
.acf-field-ftm-carousel-btn-color .acf-label,
.acf-field-ftm-carousel-btn-hover-color .acf-label {
  margin: 0 0 0.5rem 0 !important;
  /* spacing below label */
  font-weight: bold;
  font-size: 13px;
  border-bottom: 4px solid #e0dfdf !important;
}

/* ACF Button Color Input */
.acf-field-ftm-carousel-btn-color .acf-input,
.acf-field-ftm-carousel-btn-hover-color .acf-input {
  margin: 0;
}

/* Carousel Styles 
 * =================================== */
/* Carousel Gallery Layout
 * ----------------------------------- */
.carousel-wrapper .acf-ftm-carousel-gallery {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
  gap: 0;
  padding: 0;
}

/* Carousel Gallery Flexbox */
.carousel-wrapper .acf-ftm-carousel-gallery figure.wp-block-image {
  flex: 0 0 auto;
  scroll-snap-align: start;
  margin: 0;
  margin-right: 25px!important;
}

/* Carousel Gallery Images */
.carousel-wrapper .acf-ftm-carousel-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

/* ACF Carousel Hide Scrollbar */
.carousel-wrapper.hide-scrollbar .acf-ftm-carousel-gallery {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Hide scrollbar for WebKit browsers */
.carousel-wrapper.hide-scrollbar .acf-ftm-carousel-gallery::-webkit-scrollbar {
  display: none;
}

/* Carousel Controls
 * ----------------------------------- */
.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0rem;
}

/* Carousel Control Positioning - Top Left */
.carousel-controls.controls-top-left {
  justify-content: flex-start;
  flex-direction: row;
  left: 0;
}

/* Carousel Control Positioning - Top Middle */
.carousel-controls.controls-top-middle {
  justify-content: center;
  flex-direction: row;
}

/* Carousel Control Positioning - Top Right */
.carousel-controls.controls-top-right {
  justify-content: flex-end;
  flex-direction: row;
}

/* Carousel Control Positioning - Left Side */
.carousel-controls.controls-left {
  flex-direction: column;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* Carousel Control Positioning - Right Side */
.carousel-controls.controls-right {
  flex-direction: column;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* Carousel Control Positioning - Inline */
.carousel-controls.controls-inline {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

/* Carousel Control Buttons - Inline*/
.carousel-controls.controls-inline .carousel-btn {
  pointer-events: auto;
  /* buttons remain clickable */
  position: relative;
  z-index: 1;
}

/* Carousel Control Button - Inline-Next */
.carousel-controls.controls-inline .carousel-btn.next {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* Carousel Control Button */
.ftm-carousel-block .carousel-btn {
  background-color: var(--btn-color, #24144C);
  color: #fff;
  border: none;
  border-radius: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.3s;
}

/* Carousel Control Button Hover */
.ftm-carousel-block .carousel-btn:hover {
  background-color: var(--btn-hover-color, #016357);
}

/* Carousel Control Button Disabled */
.carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Carousel Control Button Rounded Style */
.carousel-controls.btn-style-rounded .carousel-btn {
  border-radius: 8px;
}

/* Carousel Control Button Square Style */
.carousel-controls.btn-style-square .carousel-btn {
  border-radius: 0;
}

/* Thumbnails
 * ----------------------------------- */
/* Carousel Thumbnails Container */
.carousel-thumbnails-wrapper {
  margin-top: 1rem;
  flex-shrink: 0;
}

/* Carousel Thumbnails */
.carousel-thumbnails {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.5rem;
  scrollbar-width: none;
  margin-top: 1.5rem;
}

/* Carousel Thumbnails Scrollbar */
.carousel-thumbnails::-webkit-scrollbar {
  display: none;
}

/* Carousel Thumbnail */
.carousel-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: 4px;
  border: 2px solid transparent;
  scroll-snap-align: center;
}

/* Carousel Thumbnail-Item */
.thumbnail-item {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: width 0.3s ease, height 0.3s ease;
}

/* Carousel - Full Width
 * ----------------------------------- */
.carousel-wrapper.carousel-fullwidth {
  width: 70vw;
  max-width: 70vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  box-sizing: border-box;
}

/* Carousel Lightbox - Glightbox
 * ----------------------------------- */
/* Glightbox Overlay */
.goverlay {
  background: rgb(36 20 76 / 85%);
}
/* GLightbox Image */
.gslide-image img {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* GLightbox Close Button */
.glightbox-clean .gclose {
  display: block !important;
  color: white;
  font-size: 2rem;
  top: 20px;
  right: 20px;
}

/* @media Queries
 * =================================== */
/* Carousel @media Queries - 1024px */
@media (max-width: 1024px) {
  .carousel-thumbnails .thumbnail-item {
    width: 90px !important;
    height: 90px !important;
  }
}

/* Carousel @media Queries - 768px */
@media (max-width: 768px) {
  .carousel-wrapper {
    padding: 0 40px;
  }
  .carousel-wrapper .acf-ftm-carousel-gallery figure.wp-block-image {
    margin: 15px 0;
  }
  .carousel-thumbnails .thumbnail-item {
    width: 70px !important;
    height: 70px !important;
  }

  .carousel-wrapper.carousel-fullwidth {
    width: 95vw;
    max-width: 95vw;
  }
  .glightbox-mobile .goverlay {
    background: rgb(36 20 76 / 85%);
  }
}

/* Carousel @media Queries - 480px */
@media (max-width: 480px) {
  .carousel-thumbnails .thumbnail-item {
    width: 60px !important;
    height: 60px !important;
  }
}