/* Video Carousel Section */
.video-carousel {
  position: relative;
  width: 100%;
  overflow-x: clip;
  overflow-y: visible;
}
.video-carousel .slick-list {
  /* padding-left : 0 !important; */
}
.video-carousel .slick-list {
  margin: 0 -8px;
}
@media (min-width: 1024px) {
  .video-carousel .slick-list {
    margin: 0 -16px;
  }
}
.video-carousel-inner {
  position: relative;
  overflow: visible;
}

/* Header Section */
.video-carousel-header {
  margin-bottom: var(--space-xl, 32px);
}

.video-carousel-title-wrapper {
  line-height: 1.2;
}

.video-carousel-title {
  margin: 0;
}

.video-carousel-description-wrapper {
  line-height: 1.5;
}

.video-carousel-description {
  margin: 0;
}

.video-carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: visible;
}

/* Carousel Container */
.video-carousel-container {
  position: relative;
  overflow: visible;
}

/* Carousel Track */
.video-carousel-track {
  /* display: flex;
  width: 100%;
  will-change: transform;
  gap: var(--space-md, 16px);
  padding-right: var(--space-3xl, 48px); */
}

/* Carousel Item */
.video-carousel-item {
  flex-shrink: 0;
  position: relative;
  padding: 0 8px;
  /* width: var(--video-card-width-mobile, 175px) !important; */
}

@media (min-width: 1024px) {
  .video-carousel-item {
    /* width: var(--video-card-width-desktop, 350px) !important; */
      padding: 0 16px;
  }
}

/* Video Wrapper */
.video-carousel-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16; /* Vertical video aspect ratio */
  background: #000;
  overflow: hidden;
}

/* Fluid Media Widget Styling */
.video-carousel-media {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.video-carousel-media fluid-media-widget {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

/* The SDK renders the player inside a shadow root, so the rules below never
   reach the real <video>. Its outermost div is light DOM, though, and sizing
   that is what carries the height inward. Needs height="100%" on the element
   too, otherwise the popover embed falls back to the SDK's fixed 400px and
   leaves the wrapper's black background showing under the video. */
.video-carousel-media fluid-media-widget > div {
  height: 100%;
}

/* Ensure fluid media content fills container and is clickable */
.video-carousel-media fluid-media-widget video,
.video-carousel-media fluid-media-widget img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none; /* Let the parent widget handle clicks for popover */
}

.video-carousel-media img,
.video-carousel-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Native Video Element */
.video-carousel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-carousel-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Play Button Overlay */
.video-carousel-play-button-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.video-carousel-video-wrapper:hover .video-carousel-play-button-overlay {
  background-color: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.video-carousel-play-icon {
  width: 20px;
  height: 20px;
  color: white;
  flex-shrink: 0;
}

/* Title Overlay */
.video-carousel-item-title {
  position: absolute;
  bottom: var(--space-md, 16px);
  left: var(--space-md, 16px);
  right: var(--space-md, 16px);
  padding: var(--space-sm, 8px) var(--space-md, 16px);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md, 6px);
  line-height: 1.2;
  z-index: 5;
}

/* Navigation Controls Container */
.video-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-md, 16px);
  padding: var(--space-sm, 8px) 0;
}

/* Reversed layout: Dots left, Arrows right */
.video-carousel-controls.controls-layout-reversed {
  flex-direction: row-reverse;
}

.video-carousel-controls.controls-layout-reversed .video-carousel-progress .slick-dots{
  justify-content: flex-start;
}

/* Navigation Buttons Group */
.video-carousel-nav-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-sm, 8px);
}

/* Navigation Buttons */
.video-carousel-nav-btn {
  /* 2026-09-25 (D39): 44px on phones too; was 40px under 640px, below the 44px touch minimum. */
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full, 9999px);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Give the button an edge.

        It was a white circle on a cream page with no border, a 10% drop shadow and
        opacity 0.7 — so the only thing that actually read was the shadow, which is
        why the client described it as "they don't have an outline but do have a
        shadow, it's like you can see half of the button".

        A 1px ring in the muted token measures 4.89:1 against the cream #F9F7F2,
        comfortably over the 3:1 WCAG minimum for a non-text control boundary,
        where the old shadow was nowhere near it. The shadow goes: this brand is
        flat and warm, and the ring is doing the job the shadow was failing at.
        Full opacity too — the 0.7 was the other half of the "half a button" look;
        the disabled state below still dims, so the affordance is unchanged. */
  border: 1px solid var(--clr-text-muted, #6C6C6C);
  box-shadow: none;
  transition: all 0.3s ease;
  opacity: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.video-carousel-nav-btn:hover:not(.slick-disabled) {
  transform: scale(1.1);
  border-color: var(--clr-primary, #49473E);
}

.video-carousel-nav-btn.slick-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.video-carousel-nav-btn:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.video-carousel-nav-btn svg {
  width: 24px;
  height: 24px;
}

/* Progress Indicator */
.video-carousel-progress .slick-dots{
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-sm, 8px);
}

.video-carousel-progress .slick-dots button{
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full, 9999px);
  border: none;
  background: rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  padding: 0;
  cursor: pointer;
  font-size: 0;
}

.video-carousel-progress .slick-dots button:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: scale(1.2);
}

.video-carousel-progress .slick-dots li.slick-active button{
  width: 32px;
  background: rgba(0, 0, 0, 0.8);
}

.video-carousel-progress .slick-dots button:focus {
  outline: 2px solid rgba(0, 0, 0, 0.5);
  outline-offset: 2px;
}

/* Responsive Design */
@media (min-width: 640px) {
  .video-carousel-container {
    /* margin-right: calc(-1 * var(--space-3xl, 48px)); */
  }
  
  .video-carousel-track {
    /* gap: var(--space-lg, 24px); */
  }
  
  .video-carousel-nav-btn {
    width: 44px;
    height: 44px;
  }
  
  .video-carousel-nav-buttons {
    gap: var(--space-md, 16px);
  }
  
  .video-carousel-controls {
    margin-top: var(--space-lg, 24px);
  }
}

@media (min-width: 1024px) {
  .video-carousel-container {
    /* margin-right: calc(-1 * var(--space-3xl, 48px)); */
  }
  
  .video-carousel-track {
    /* gap: var(--space-xl, 32px); */
  }
  
  .video-carousel-nav-btn {
    width: 48px;
    height: 48px;
  }
  
  .video-carousel-nav-btn svg {
    width: 24px;
    height: 24px;
  }
  
  .video-carousel-nav-buttons {
    gap: var(--space-lg, 24px);
  }
  
  .video-carousel-controls {
    margin-top: var(--space-xl, 32px);
  }
}

/* Background Image Support */
.video-carousel[data-bg] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.video-carousel-inner[data-bg] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Touch/Swipe Optimization for Mobile */
/* @media (max-width: 639px) {
  .video-carousel-container {
    margin-right: calc(-1 * var(--space-lg, 24px));
  }
  
  .video-carousel-track {
    padding-right: var(--space-lg, 24px);
  }
} */

/* Accessibility */
/* @media (prefers-reduced-motion: reduce) {
  .video-carousel-track {
    transition: none;
  }
  
  .video-carousel-nav-btn {
    transition: opacity 0.2s ease;
  }
  
  .video-carousel-nav-btn:hover:not(:disabled) {
    transform: scale(1);
  }
} */

/* Title/description are richtext blocks rendered into a .rte wrapper.
   Typography lives on the WRAPPER (editor-safe — the WYSIWYG editor cannot
   strip the wrapper's classes). The inner <h2>/<p> inherits font + color
   from the wrapper so typography survives even after the editor rewrites
   the inner tag to a bare tag on alignment/format edits. */
.video-carousel-title-wrapper > *,
.video-carousel-description-wrapper > * {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0 !important;
}
