/*
 * Stories Slider (Beauty Blog Widgets)
 * - Circles row with animated progress ring
 * - Panel below with media + text
 * - Panels switch via fade (hide/show), NOT sliding
 */

.bbw-stories-slider{
  --story-size: 68px;
  --story-gap: 16px;
  --ring-w: 2px;
  --ring-bg: #fff;
  --ring-fg: #CC6092;
  --nav-size: 40px;
  --nav-bg: rgba(255,255,255,.95);
  --nav-border: rgba(0,0,0,.12);
  --panel-gap: 50px;
  width: 100%;
  position: relative;
}

.bbw-stories-slider__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 6px 0 16px;
  width: 100%;
      position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
}

.bbw-stories-nav--prev {
  margin-left: -65px;
}

.bbw-stories-nav--next {
  margin-right: -65px;
}

.bbw-stories-slider__dots{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--story-gap);
  overflow-x: auto;
  padding: 6px 2px;
  scrollbar-width: none;
}
.bbw-stories-slider__dots::-webkit-scrollbar{display:none}

.bbw-story-dot {
  position: relative;
  width: 152px !important;
  height: 152px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  flex: 0 0 auto;
  border: none !important;
}

.bbw-story-dot:hover, .bbw-story-dot:focus {
  background-color: #ffffff00 !important;
}

.bbw-story-dot__img{
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background-size: cover;
  background-position: center;
  background-color: rgba(0,0,0,.06);
}

.bbw-story-dot__ring{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.bbw-story-dot__ring-bg,
.bbw-story-dot__ring-fg{
  fill: none;
  stroke-width: var(--ring-w);
}

.bbw-story-dot__ring-bg{ stroke: var(--ring-bg); }
.bbw-story-dot__ring-fg{
  stroke: var(--ring-fg);
  stroke-linecap: round;
  /* r=20 => circumference ~ 125.66 */
  stroke-dasharray: 126;
  stroke-dashoffset: 126;
}

.bbw-story-dot.is-active .bbw-story-dot__ring-fg{
  animation: bbwStoryRing var(--bbw-story-duration, 6000ms) linear forwards;
}

@keyframes bbwStoryRing{
  from { stroke-dashoffset: 126; }
  to   { stroke-dashoffset: 0; }
}

.bbw-stories-slider__nav{
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  width: 100%;
  justify-content: space-between;
}

.bbw-stories-nav{
  width: 50px !important;
  height: 50px !important;
  border-radius: 999px !important;
  background-color: #2F2F2F !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px !important;
  user-select: none !important;
  font-weight: 400 !important;
  color: #fff !important;
      display: flex !important;
    align-items: center;
    gap: 10px;
    border: none !important;
}

/* ==============================
   PANELS (FADE HIDE/SHOW)
   ============================== */

/* Panels wrapper */
.bbw-stories-slider__panels{
  position: relative;
  margin-top: 60px;
}

/* Base: ALL panels are taken out of flow so they don't create empty space */
.bbw-story-panel{
  position: absolute;
  inset: 0;
  width: 100%;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity .45s ease,
    transform .45s ease,
    visibility 0s linear .45s;
}

/* Active: becomes in-flow so wrapper gets height */
.bbw-story-panel.is-active{
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

/* Exit/enter polish */
.bbw-story-panel.is-exit{
  opacity: 0;
  transform: translateY(-8px);
}
.bbw-story-panel.is-enter{
  opacity: 1;
  transform: translateY(0);
}

/* optional enter/exit polish */
.bbw-story-panel.is-exit{
  opacity: 0;
  transform: translateY(-8px);
}
.bbw-story-panel.is-enter{
  opacity: 1;
  transform: translateY(0);
}

/* Layout inside panel */
.bbw-story-panel__grid{
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: var(--panel-gap);
  align-items: flex-start;
}

.bbw-story-panel__media{
  position: relative;
  overflow: hidden;
  background: rgba(0,0,0,.05);
  display: block;
  min-height: 280px;
}

.bbw-story-panel__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bbw-story-panel__content{
  min-width: 0;
}

.bbw-story-pill{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  font-size: 20px !important;
  color: #fff;
  text-decoration: none;
  margin: 0 0 12px;
}

.bbw-story-title{ margin: 0 0 10px; line-height: 40px !important; }

.bbw-story-title a {
  font-size: 32px !important;
  line-height: 22px;
}

.bbw-story-excerpt {
  margin-top: 20px;
}

.ft-storie-readmore {
  font-size: 16px;
  font-weight: 600;
  transition: .2s;
  color: #000;
}

.ft-storie-readmore:hover {
  text-decoration: underline;
}

.bbw-story-excerpt p {
  color: #2F2F2F;
  font-size: 18px;
}

.bbw-story-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce){
  .bbw-story-panel{
    transition: none;
    transform: none;
  }
}

/* Mobile */
@media (max-width: 767px){
  .bbw-stories-slider{ --story-size: 62px; --panel-gap: 16px; }
  .bbw-story-panel__grid{ grid-template-columns: 1fr; }
  .bbw-story-panel__media{ min-height: 220px; }
}
