/* BDG Speedo Stories — intentionally minimal, scoped to plugin classes */
.bdg-story-launcher,
.bdg-story-player button { -webkit-tap-highlight-color: transparent; }
.bdg-story-launcher {
  --bdg-story-accent: #e31b23;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; appearance: none; background: transparent; border: 0; padding: 4px 5px;
  cursor: pointer; color: inherit; font: inherit; line-height: 1.1; text-align: center;
  text-decoration: none; width: auto; min-width: 66px; max-width: 130px;
}
.bdg-story-launcher:hover,
.bdg-story-launcher:focus { color: inherit; background: transparent; outline-offset: 3px; }
.bdg-story-launcher:focus-visible { outline: 2px solid var(--bdg-story-accent); }
.bdg-story-launcher__ring {
  display: grid; place-items: center; width: 59px; height: 59px; padding: 3px;
  border: 2.5px solid var(--bdg-story-accent); border-radius: 50%;
  position: relative; box-sizing: border-box; background: #fff; flex-shrink: 0;
  transition: border-color .2s ease, transform .2s ease;
}
.bdg-story-launcher:hover .bdg-story-launcher__ring { transform: scale(1.055); }
.bdg-story-launcher--seen .bdg-story-launcher__ring { border-color: #c5c5c5; }
.bdg-story-launcher__inner {
  display: flex; justify-content: center; align-items: center;
  overflow: hidden; width: 100%; height: 100%; border-radius: 50%; background: #0d2031;
}
.bdg-story-launcher__image { display: block; width: 100%; height: 100%; object-fit: cover; }
.bdg-story-launcher__fallback { display: grid; place-items: center; width: 100%; height: 100%; color: #fff; font-size: 19px; }
.bdg-story-launcher__new { position: absolute; right: -3px; bottom: 2px; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: var(--bdg-story-accent); box-sizing: content-box; }
.bdg-story-launcher--seen .bdg-story-launcher__new { display: none; }
.bdg-story-launcher__label { display: block; font-family: inherit; color: currentColor; font-size: 9px; line-height: 1.25; font-weight: 700; letter-spacing: .015em; text-align: center; white-space: normal; overflow-wrap: anywhere; }
.bdg-story-launcher--header .bdg-story-launcher__ring { width: 51px; height: 51px; }
.bdg-story-launcher--header { min-width: 62px; }
.bdg-story-floating-wrap {
  z-index: 999993; position: fixed; bottom: 96px; pointer-events: none;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}
.bdg-story-floating-wrap--left { left: 17px; }
.bdg-story-floating-wrap--right { right: 17px; }
.bdg-story-floating-wrap.is-shown { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.bdg-story-launcher--floating {
  padding: 8px; min-width: 73px; max-width: 108px; background: #fff; color: #202020;
  border-radius: 16px; box-shadow: 0 4px 23px rgba(0,0,0,.13);
}
.bdg-story-launcher--floating .bdg-story-launcher__label { font-size: 8px; }
body.bdg-story-no-scroll { overflow: hidden !important; }
.bdg-story-overlay[hidden], .bdg-story-player__products[hidden], .bdg-story-player__copy p[hidden] { display: none !important; }
.bdg-story-overlay { z-index: 2147483000; position: fixed; inset: 0; display: grid; place-items: center; padding: 18px; box-sizing: border-box; }
.bdg-story-overlay__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.83); }
.bdg-story-player {
  --bdg-story-accent: #e31b23;
  width: min(414px,100%); height: min(780px,calc(100dvh - 36px));
  max-height: 100%; min-height: 350px; background: #050607; overflow: hidden; isolation: isolate;
  position: relative; border-radius: 15px; box-shadow: 0 14px 55px rgba(0,0,0,.25);
  color: #fff; font-family: inherit; outline: 0;
}
.bdg-story-player__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #050607; cursor: pointer; }
.bdg-story-player__progress { position: absolute; display: flex; gap: 4px; z-index: 6; top: 10px; left: 11px; right: 11px; height: 3px; }
.bdg-story-progress-track { height: 3px; flex: 1; overflow: hidden; background: rgba(255,255,255,.4); border-radius: 2px; }
.bdg-story-progress-fill { height: 100%; display: block; width: 0; background: #fff; transition: width .12s linear; border-radius: inherit; }
.bdg-story-player__top {
  z-index: 5; position: absolute; top: 23px; left: 14px; right: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.bdg-story-player__brand { color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .07em; white-space: nowrap; max-width: calc(100% - 40px); overflow: hidden; text-overflow: ellipsis; }
.bdg-story-player__brand > span:first-child { color: var(--bdg-story-accent); font-size: 13px; }
.bdg-story-player__close,
.bdg-story-player__nav,
.bdg-story-player__center-action {
  appearance: none; cursor: pointer; border: 0; outline-offset: 3px; font-family: inherit;
  display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.33); padding: 0;
}
.bdg-story-player__close { flex-shrink: 0; width: 31px; height: 31px; border-radius: 50%; font-size: 25px; line-height: 1; }
.bdg-story-player__center-action { position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%); z-index: 4; width: 58px; height: 58px; border-radius: 50%; font-size: 22px; opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.bdg-story-player__center-action.is-visible { opacity: 1; pointer-events: auto; }
.bdg-story-player__nav { z-index: 5; position: absolute; top: 47%; width: 33px; height: 51px; border-radius: 7px; font-size: 31px; opacity: .58; }
.bdg-story-player__nav:hover { opacity: 1; background: rgba(0,0,0,.6); }
.bdg-story-player__nav:disabled { opacity: 0; pointer-events: none; }
.bdg-story-player__nav--prev { left: 6px; }
.bdg-story-player__nav--next { right: 6px; }
.bdg-story-player__content {
  position: absolute; z-index: 4; bottom: 0; left: 0; right: 0;
  padding: 70px 14px max(18px,env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0,0,0,.8), rgba(0,0,0,0));
  color: #fff; text-align: right; pointer-events: none;
}
.bdg-story-player__copy h2 { margin: 0 0 6px; padding: 0; font-family: inherit; font-weight: 800; font-size: 20px; line-height: 1.2; color: #fff; text-transform: none; }
.bdg-story-player__copy p { margin: 0 0 13px; padding: 0; font: 400 12px/1.45 inherit; color: #fff; }
.bdg-story-player__products { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding: 1px 1px 4px; scroll-snap-type: x proximity; pointer-events: auto; }
.bdg-story-product { box-sizing: border-box; flex: 0 0 min(100%, 310px); min-height: 67px; max-width: 100%; display: flex; gap: 10px; align-items: center; text-align: right; padding: 7px 9px; text-decoration: none !important; color: #191919 !important; background: rgba(255,255,255,.96); border-radius: 10px; scroll-snap-align: start; }
.bdg-story-product:hover { background: #fff; }
.bdg-story-product__image { flex-shrink: 0; width: 50px; height: 50px; border-radius: 6px; background: #f6f6f6; object-fit: contain; }
.bdg-story-product__image--fallback { color: #222; font-weight: 800; display: grid; place-items: center; font-size: 25px; }
.bdg-story-product__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bdg-story-product__name { font-size: 11px; line-height: 1.35; font-weight: 700; max-height: 31px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bdg-story-product__price { font-size: 12px; line-height: 1.2; color: #181818; font-weight: 700; }
.bdg-story-product__price del { opacity: .55; font-size: 10px; }
.bdg-story-product__price ins { text-decoration: none; }
.bdg-story-product__arrow { flex-shrink: 0; font-size: 25px; color: var(--bdg-story-accent); }
@media (max-width: 600px) {
  .bdg-story-overlay { padding: 0; }
  .bdg-story-player { width: 100%; height: 100dvh; max-height: none; min-height: 0; border-radius: 0; }
  .bdg-story-floating-wrap { bottom: 92px; }
  .bdg-story-launcher--floating .bdg-story-launcher__ring { width: 53px; height: 53px; }
  .bdg-story-player__content { padding-bottom: max(24px,env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .bdg-story-launcher__ring, .bdg-story-floating-wrap, .bdg-story-progress-fill, .bdg-story-player__center-action { transition: none !important; }
}

/* v1.1: self-inserting header story, with no Elementor/template edits. */
.bdg-story-header-mount {
  box-sizing: border-box; flex: 0 0 auto; align-self: center;
  display: inline-flex; align-items: center; justify-content: center;
  width: max-content; max-width: 108px; margin-inline: 6px;
  position: relative; z-index: 3;
}
.bdg-story-header-mount .bdg-story-launcher--header {
  padding: 2px 3px; min-width: 48px; max-width: 106px; gap: 3px;
}
.bdg-story-header-mount .bdg-story-launcher--header .bdg-story-launcher__ring {
  width: 41px; height: 41px; padding: 2px; border-width: 2px;
}
.bdg-story-header-mount .bdg-story-launcher--header .bdg-story-launcher__label {
  font-size: 7px; line-height: 1.1; max-width: 104px;
}
@media (max-width: 767px) {
  .bdg-story-header-mount { margin-inline: 2px; max-width: 42px; }
  .bdg-story-header-mount .bdg-story-launcher--header { min-width: 38px; max-width: 42px; padding: 0; }
  .bdg-story-header-mount .bdg-story-launcher--header .bdg-story-launcher__ring {
    width: 35px; height: 35px;
  }
  .bdg-story-header-mount .bdg-story-launcher--header .bdg-story-launcher__label { display: none; }
}

/* v1.2: reliable header fallback when theme header markup is unknown. */
.bdg-story-header-mount--edge {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  z-index: 999; padding: 2px; background: rgba(255,255,255,.96);
  border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.bdg-story-header-mount--fixed {
  position: fixed; left: 12px; top: 10px; z-index: 999990;
  background: rgba(255,255,255,.96); padding: 2px;
  border-radius: 9px; box-shadow: 0 2px 10px rgba(0,0,0,.13);
}
@media (max-width: 767px) {
  .bdg-story-header-mount--edge { left: 6px; }
  .bdg-story-header-mount--fixed { left: 8px; top: 8px; }
}

/* v1.6 — tighten vertical spacing between featured products and story heading; preserve in-flow layout. */
/* v1.4 — Instagram-like circular stories, separated animated outer ring. */
.bdg-story-strip,
.bdg-story-strip * { box-sizing: border-box; }
.bdg-story-strip {
  --bdg-story-accent: #e31b23;
  --bdg-story-ring-seen: #cbd0d5;
  --bdg-story-diameter: 114px;
  width: 100%; max-width: 1350px; margin: -10px auto 36px;
  padding: 0 clamp(16px, 3vw, 44px); overflow: hidden;
  background: transparent; font-family: inherit;
  position: relative; isolation: isolate;
}
/* 1.5 — a single restrained heading above the stories; no labels on circles. */
.bdg-story-strip .bdg-story-strip__title {
  display: block; width: 100%; margin: 0 0 22px !important;
  padding: 0 !important; border: 0 !important;
  color: inherit; background: none; text-align: center;
  font-family: inherit !important; font-size: clamp(22px, 2.4vw, 30px) !important;
  line-height: 1.25 !important; font-weight: 700 !important;
  letter-spacing: .045em; text-transform: none;
}
.bdg-story-strip__stage { position: relative; }
.bdg-story-strip__track {
  display: flex; align-items: center; gap: clamp(15px, 2vw, 23px);
  width: 100%; min-height: calc(var(--bdg-story-diameter) + 14px);
  padding: 7px 3px 10px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-padding-inline: 3px;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.bdg-story-strip__track::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .bdg-story-strip__track--centered { justify-content: center; }
}
.bdg-story-strip__item {
  flex: 0 0 var(--bdg-story-diameter); width: var(--bdg-story-diameter);
  min-width: 0; padding: 0; margin: 0; scroll-snap-align: start;
}
.bdg-story-strip .bdg-story-strip__card {
  appearance: none !important; display: grid !important; place-items: center;
  position: relative; width: var(--bdg-story-diameter) !important;
  height: var(--bdg-story-diameter) !important;
  min-width: 0 !important; min-height: 0 !important;
  max-width: none !important; aspect-ratio: 1 / 1 !important;
  padding: 0 !important; margin: 0 !important;
  border: 0 !important; border-radius: 50% !important;
  background: transparent !important; box-shadow: none !important;
  overflow: visible !important; color: inherit; line-height: 1;
  cursor: pointer; outline: none; text-decoration: none;
  transition: transform .22s ease;
}
.bdg-story-strip .bdg-story-strip__card:hover { transform: scale(1.045); }
.bdg-story-strip .bdg-story-strip__card:focus-visible .bdg-story-strip__ring {
  outline: 2px solid var(--bdg-story-accent); outline-offset: 3px;
}
.bdg-story-strip__ring {
  display: grid; place-items: center; position: relative; isolation: isolate;
  flex: 0 0 auto; width: 100%; height: 100%;
  padding: 0; border: 3px solid var(--bdg-story-accent);
  border-radius: 50%; background: transparent;
  box-shadow: none; transition: border-color .22s ease;
}
/* The animated sheen lives only on the ring — never rotate the photo. */
.bdg-story-strip__ring::before {
  content: ""; position: absolute; inset: -3px; z-index: 2;
  border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 35deg,
    #e31b23 0deg, #e31b23 255deg, #f2565c 281deg,
    #ffd1c8 300deg, #f2565c 318deg, #e31b23 343deg, #e31b23 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.7px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.7px));
  animation: bdg-story-ring-orbit 4.8s linear infinite;
}
.bdg-story-strip__inner {
  display: block; position: absolute; z-index: 1;
  inset: 6px; width: auto; height: auto; min-width: 0; min-height: 0;
  border-radius: 50%; overflow: hidden; background: #0b2940;
}
.bdg-story-strip__cover {
  display: block !important; position: absolute; inset: 0;
  width: 100% !important; height: 100% !important;
  object-fit: cover; object-position: center; border: 0; border-radius: 50%;
  transform: scale(1); transition: transform .3s ease;
}
.bdg-story-strip__cover--empty {
  background: radial-gradient(circle at 37% 32%, #2984b9, #07304a 75%);
}
.bdg-story-strip__card:hover .bdg-story-strip__cover { transform: scale(1.04); }
.bdg-story-strip__card--seen .bdg-story-strip__ring { border-color: var(--bdg-story-ring-seen); }
.bdg-story-strip__card--seen .bdg-story-strip__ring::before {
  background: var(--bdg-story-ring-seen); animation: none;
}
.bdg-story-strip[data-bdg-ring-animation="none"] .bdg-story-strip__ring::before {
  background: var(--bdg-story-accent); animation: none;
}
.bdg-story-strip[data-bdg-ring-animation="pulse"] .bdg-story-strip__ring::before {
  background: var(--bdg-story-accent); animation: bdg-story-ring-pulse 3.2s ease-in-out infinite;
}
/* A seen story must remain grey regardless of the animation mode. */
.bdg-story-strip[data-bdg-ring-animation] .bdg-story-strip__card--seen .bdg-story-strip__ring::before {
  background: var(--bdg-story-ring-seen); animation: none;
}
@keyframes bdg-story-ring-orbit { to { transform: rotate(360deg); } }
@keyframes bdg-story-ring-pulse { 0%,100% { opacity: 1; } 50% { opacity: .50; } }
.bdg-story-strip .bdg-story-strip__arrow {
  display: grid; place-items: center; position: absolute;
  top: 50%; transform: translateY(-50%); z-index: 3;
  width: 32px; height: 32px; padding: 0 !important; margin: 0 !important;
  border: 1px solid #e9e9e9; border-radius: 50%;
  background: rgba(255,255,255,.98); color: #292929;
  box-shadow: 0 3px 14px rgba(0,0,0,.09);
  font: 400 25px/1 Arial, sans-serif; cursor: pointer;
}
.bdg-story-strip__arrow--prev { left: 0; }
.bdg-story-strip__arrow--next { right: 0; }
.bdg-story-strip .bdg-story-strip__arrow:disabled { opacity: 0; pointer-events: none; }
.bdg-story-strip .bdg-story-strip__arrow:hover { color: var(--bdg-story-accent); }
@media (max-width: 767px) {
  .bdg-story-strip { --bdg-story-diameter: 89px; margin: 8px auto 24px; padding: 0 12px; }
  .bdg-story-strip .bdg-story-strip__title { margin-bottom: 15px !important; font-size: 22px !important; }
  .bdg-story-strip__track { gap: 13px; padding: 6px 2px 9px; }
  .bdg-story-strip__inner { inset: 5px; }
  .bdg-story-strip .bdg-story-strip__arrow { display: none; }
}
@media (max-width: 360px) {
  .bdg-story-strip { --bdg-story-diameter: 82px; }
  .bdg-story-strip__track { gap: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .bdg-story-strip__ring::before, .bdg-story-launcher__ring::before {
    animation: none !important; background: var(--bdg-story-accent) !important;
  }
  .bdg-story-strip__card--seen .bdg-story-strip__ring::before,
  .bdg-story-launcher--seen .bdg-story-launcher__ring::before {
    background: #cbd0d5 !important;
  }
  .bdg-story-strip__cover, .bdg-story-strip__card { transition: none !important; }
}

/* The header/floating alternatives retain the same outboard story ring, without text. */
.bdg-story-launcher { --bdg-story-accent: #e31b23; }
.bdg-story-launcher .bdg-story-launcher__ring {
  position: relative; isolation: isolate; padding: 5px;
  border: 3px solid var(--bdg-story-accent); background: transparent;
  border-radius: 50%; overflow: visible;
}
.bdg-story-launcher .bdg-story-launcher__ring::before {
  content: ""; position: absolute; inset: -3px; z-index: 2;
  border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 35deg,
    #e31b23 0deg, #e31b23 255deg, #f2565c 281deg,
    #ffd1c8 300deg, #f2565c 318deg, #e31b23 343deg, #e31b23 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.7px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.7px));
  animation: bdg-story-ring-orbit 4.8s linear infinite;
}
.bdg-story-launcher--seen .bdg-story-launcher__ring { border-color: #cbd0d5; }
.bdg-story-launcher--seen .bdg-story-launcher__ring::before { background: #cbd0d5; animation: none; }
.bdg-story-launcher[data-bdg-ring-animation="pulse"]:not(.bdg-story-launcher--seen) .bdg-story-launcher__ring::before {
  background: #e31b23; animation: bdg-story-ring-pulse 3.2s ease-in-out infinite;
}
.bdg-story-launcher[data-bdg-ring-animation="none"]:not(.bdg-story-launcher--seen) .bdg-story-launcher__ring::before {
  background: #e31b23; animation: none;
}
.bdg-story-launcher .bdg-story-launcher__inner { position: relative; z-index: 1; }
.bdg-story-launcher--header, .bdg-story-launcher--floating { max-width: none; min-width: 0; }
.bdg-story-header-mount .bdg-story-launcher--header .bdg-story-launcher__ring { padding: 4px; }

/* v1.7: the in-flow story strip is always visible on the active mobile layout.
   Its mount is moved outside desktop-only Elementor sections in front.js. */
@media (max-width: 767px) {
  .bdg-story-strip[data-bdg-story-automatic="1"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    clear: both;
    width: 100%;
  }
}

/* v1.8: real HTML fallback must remain visible on small screens even if
   the site's optimizer delays relocation scripts. Do not depend on Elementor
   mobile/desktop containers to show the story strip. */
@media (max-width: 767px) {
  body .bdg-story-strip[data-bdg-story-automatic="1"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    transform: none !important;
    content-visibility: visible !important;
    margin: 8px auto 24px !important;
    clear: both;
  }
  body .bdg-story-strip[data-bdg-story-automatic="1"] .bdg-story-strip__track {
    display: flex !important;
    visibility: visible !important;
  }
}

/* v1.9 — product links must be tappable above the video on iOS/Android. */
.bdg-story-player .bdg-story-player__content {
  z-index: 7;
  pointer-events: auto;
}
.bdg-story-player .bdg-story-player__products,
.bdg-story-player .bdg-story-product {
  position: relative;
  pointer-events: auto !important;
  touch-action: manipulation;
}
.bdg-story-player .bdg-story-product { z-index: 9; cursor: pointer; }
