/**
 * Oralyze Luxury UGC Social Vertical Video (9:16) Carousel Stylesheet
 * 9:16 Vertical Reel Spotlight with Attached Shoppable Product Capsules
 * Reference: media_1794892589655_55a5ad58.mp4 (Frame 3 / ugc_frame_003.png)
 */

.oralyze-ugc-carousel-wrapper {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-primary, 'Mona Sans', -apple-system, BlinkMacSystemFont, sans-serif);
  overflow: hidden;
}

.oralyze-ugc-section {
  position: relative;
  padding-top: 100px;
  padding-right: 0;
  padding-bottom: 90px;
  padding-left: 0;
  margin-top: 40px;
  background-color: #FAFAF8;
  color: #20213A;
  overflow: hidden;
  scroll-margin-top: 160px;
}

.oralyze-ugc-section.theme-sand {
  background-color: #F4EFEA;
}

.oralyze-ugc-section.theme-charcoal {
  background-color: #1A1A1A;
  color: #FAFAF8;
}

.ugc-inner-container {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
}

/* ==========================================================================
   1. SECTION HEADER
   ========================================================================== */
.ugc-section-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 44px auto;
  padding: 0 20px;
  /* Ensure the header is fully visible and not clipped by sticky header */
  position: relative;
  z-index: 1;
}

.ugc-eyebrow {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: #767EFC;
  margin-bottom: 12px;
}

.theme-charcoal .ugc-eyebrow {
  color: #A3A9FD;
}

.ugc-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 700;
  font-style: normal;
  line-height: 1.18;
  letter-spacing: 0.01em;
  margin: 0 0 14px 0;
  color: #20213A;
  text-transform: uppercase;
}

.theme-charcoal .ugc-title {
  color: #FAFAF8;
}

.ugc-title em,
.ugc-title .serif-accent {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #393CAD;
}

.theme-charcoal .ugc-title em,
.theme-charcoal .ugc-title .serif-accent {
  color: #A3A9FD;
}

.ugc-subtitle {
  font-size: 15px;
  line-height: 1.6;
  color: #555770;
  margin: 0 auto;
  max-width: 600px;
}

.theme-charcoal .ugc-subtitle {
  color: #B2B5C8;
}

/* ==========================================================================
   2. CAROUSEL VIEWPORT & SPOTLIGHT TRACK
   ========================================================================== */
.ugc-carousel-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 24px 0 36px 0;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.ugc-carousel-viewport:active {
  cursor: grabbing;
}

.ugc-carousel-track {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: transform 0.52s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.ugc-carousel-track.is-dragging {
  transition: none !important;
  cursor: grabbing;
}

/* ==========================================================================
   3. INDIVIDUAL SLIDE CARD (9:16 VERTICAL REEL + ATTACHED PRODUCT CAPSULE)
   ========================================================================== */
.ugc-slide-card {
  flex: 0 0 320px;
  width: 320px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: center center;
  transform: scale(0.86);
  opacity: 0.78;
  transition: transform 0.48s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.48s ease;
  cursor: pointer;
}

.ugc-slide-card.is-center {
  transform: scale(1.0);
  opacity: 1;
  z-index: 5;
  cursor: default;
}

/* 9:16 Vertical Video Container */
.ugc-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  background-color: #0d0e15;
  box-shadow: 0 8px 24px rgba(32, 33, 58, 0.08);
  transition: box-shadow 0.45s ease;
}

.ugc-slide-card.is-center .ugc-video-container {
  box-shadow: 0 18px 46px rgba(32, 33, 58, 0.18);
}

.theme-charcoal .ugc-video-container {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.theme-charcoal .ugc-slide-card.is-center .ugc-video-container {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.ugc-video-element {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ugc-video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.35s ease;
  z-index: 1;
}

.ugc-video-container.is-playing .ugc-video-poster {
  opacity: 0;
  pointer-events: none;
}

/* Video Overlay Controls */
.ugc-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.36) 100%);
}

.ugc-overlay-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.ugc-overlay-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

/* Play/Pause Button (Top Left) */
.ugc-play-state-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ugc-play-state-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.08);
}

.ugc-play-state-btn .icon-pause {
  display: none;
}

.ugc-play-state-btn .icon-play {
  display: block;
}

.ugc-video-container.is-playing .ugc-play-state-btn .icon-pause {
  display: block;
}

.ugc-video-container.is-playing .ugc-play-state-btn .icon-play {
  display: none;
}

/* Non-center cards: small subtle play indicator */
.ugc-slide-card:not(.is-center) .ugc-play-state-btn {
  opacity: 0.85;
  background: rgba(0, 0, 0, 0.35);
}

/* Audio Mute Button (Bottom Right) */
.ugc-mute-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.3s ease;
}

.ugc-mute-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.08);
}

.ugc-mute-toggle-btn .icon-muted {
  display: block;
}

.ugc-mute-toggle-btn .icon-unmuted {
  display: none;
}

.ugc-video-container.is-unmuted .ugc-mute-toggle-btn .icon-muted {
  display: none;
}

.ugc-video-container.is-unmuted .ugc-mute-toggle-btn .icon-unmuted {
  display: block;
}

/* Cleanly hide controls on inactive side slides */
.ugc-slide-card:not(.is-center) .ugc-mute-toggle-btn,
.ugc-slide-card:not(.is-center) .ugc-play-state-btn {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Optional Social Network Badge */
.ugc-social-badge {
  display: none;
}

/* ==========================================================================
   4. ATTACHED SHOPPABLE PRODUCT CAPSULE DIRECTLY UNDERNEATH
   ========================================================================== */
.ugc-product-capsule {
  width: 100%;
  max-width: 320px;
  margin-top: 16px;
  padding: 12px 18px;
  background: #FFFFFF;
  border: 1px solid rgba(32, 33, 58, 0.1);
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(32, 33, 58, 0.06);
  display: none;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.42s ease, transform 0.42s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Show capsule exclusively on the active center card (matching reference design) */
.ugc-slide-card.is-center .ugc-product-capsule {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0);
  pointer-events: auto;
}

.ugc-slide-card.is-center .ugc-product-capsule:hover {
  border-color: #767EFC;
  box-shadow: 0 8px 26px rgba(118, 126, 252, 0.18);
  transform: translateY(-2px);
}

.theme-charcoal .ugc-product-capsule {
  background: #242424;
  border-color: #383838;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.theme-charcoal .ugc-slide-card.is-center .ugc-product-capsule:hover {
  border-color: #A3A9FD;
}

.ugc-capsule-thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #FAF9F6;
  border-radius: 8px;
  flex-shrink: 0;
  padding: 2px;
}

.theme-charcoal .ugc-capsule-thumb {
  background: #1A1A1A;
}

.ugc-capsule-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.ugc-capsule-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #20213A;
  line-height: 1.35;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-charcoal .ugc-capsule-title {
  color: #FAFAF8;
}

.ugc-capsule-price {
  font-size: 13px;
  font-weight: 600;
  color: #393CAD;
}

.theme-charcoal .ugc-capsule-price {
  color: #A3A9FD;
}

/* ==========================================================================
   5. NAVIGATION ARROWS (CIRCULAR Benchmark)
   ========================================================================== */
.ugc-nav-btn {
  position: absolute;
  top: calc(50% - 35px);
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid rgba(32, 33, 58, 0.12);
  color: #20213A;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(32, 33, 58, 0.12);
  cursor: pointer;
  z-index: 20;
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1), background-color 0.2s ease, color 0.2s ease, box-shadow 0.25s ease;
}

.theme-charcoal .ugc-nav-btn {
  background: #242424;
  border-color: #404040;
  color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.ugc-nav-btn:hover {
  background: #393CAD;
  color: #FFFFFF;
  border-color: #393CAD;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 8px 24px rgba(57, 60, 173, 0.28);
}

.theme-charcoal .ugc-nav-btn:hover {
  background: #767EFC;
  border-color: #767EFC;
  color: #FFFFFF;
}

.ugc-nav-prev {
  left: 36px;
}

.ugc-nav-next {
  right: 36px;
}

/* ==========================================================================
   6. DOTS PAGINATION
   ========================================================================== */
.ugc-carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 8px 0;
}

.ugc-dot {
  position: relative;
  display: inline-block;
  width: 8px !important;
  height: 8px !important;
  min-width: 8px !important;
  min-height: 8px !important;
  max-width: 8px !important;
  max-height: 8px !important;
  min-inline-size: 8px !important;
  min-block-size: 8px !important;
  border-radius: 50% !important;
  background-color: rgba(32, 33, 58, 0.22) !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: width 0.3s cubic-bezier(0.2, 0.9, 0.3, 1), background-color 0.25s ease, border-radius 0.25s ease;
}

/* Invisible 40px touch hit area for accessible mobile tapping without visual bloat */
.ugc-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  background: transparent;
  pointer-events: auto;
}

.ugc-dot:hover:not(.active) {
  background-color: rgba(32, 33, 58, 0.45) !important;
}

.ugc-dot.active {
  width: 24px !important;
  max-width: 24px !important;
  min-width: 24px !important;
  min-inline-size: 24px !important;
  height: 8px !important;
  max-height: 8px !important;
  min-height: 8px !important;
  min-block-size: 8px !important;
  border-radius: 9999px !important;
  background-color: #393CAD !important;
}

.ugc-dot:focus,
.ugc-dot:active {
  outline: none !important;
  box-shadow: none !important;
}

.ugc-dot:focus-visible {
  outline: 2px solid rgba(57, 60, 173, 0.45) !important;
  outline-offset: 3px !important;
}

.theme-charcoal .ugc-dot {
  background-color: rgba(255, 255, 255, 0.28) !important;
}

.theme-charcoal .ugc-dot.active {
  background-color: #767EFC !important;
}

@media (max-width: 768px) {
  .ugc-carousel-dots {
    margin-top: 18px;
    gap: 7px;
  }
  .ugc-dot {
    width: 7px !important;
    height: 7px !important;
    min-width: 7px !important;
    min-height: 7px !important;
    max-width: 7px !important;
    max-height: 7px !important;
    min-inline-size: 7px !important;
    min-block-size: 7px !important;
  }
  .ugc-dot.active {
    width: 22px !important;
    max-width: 22px !important;
    min-width: 22px !important;
    min-inline-size: 22px !important;
    height: 7px !important;
    max-height: 7px !important;
    min-height: 7px !important;
    min-block-size: 7px !important;
    border-radius: 9999px !important;
  }
}

/* ==========================================================================
   7. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1200px) {
  .ugc-nav-prev {
    left: 16px;
  }
  .ugc-nav-next {
    right: 16px;
  }
}

@media (max-width: 900px) {
  .ugc-slide-card {
    flex: 0 0 280px;
    width: 280px;
  }
  .ugc-product-capsule {
    max-width: 280px;
  }
  .ugc-carousel-track {
    gap: 18px;
  }
}

@media (max-width: 680px) {
  .oralyze-ugc-section {
    padding: 60px 0 70px 0;
  }
  .ugc-slide-card {
    flex: 0 0 78vw;
    width: 78vw;
    max-width: 320px;
    transform: scale(0.92);
  }
  .ugc-slide-card.is-center {
    transform: scale(1.0);
  }
  .ugc-product-capsule {
    max-width: 78vw;
  }
  .ugc-nav-btn {
    width: 40px;
    height: 40px;
  }
  .ugc-nav-prev {
    left: 8px;
  }
  .ugc-nav-next {
    right: 8px;
  }
}
