/* ============================================================
   Belly Care — Paywall feature slideshow
   Web port of lib/features/onboarding/screens/paywall_screen.dart
   (_FeatureSlideshow): 3 auto-advancing colour slides, each with a
   subtle pattern, a rotated white mock card, and a title; dot indicators.
   ============================================================ */

.pw {
  width: 100%;
  max-width: 440px;
  margin: clamp(56px, 9vw, 104px) auto 0;
}
.pw__viewport {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow-card);
}
.pw__track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.pw__slide {
  position: relative;
  flex: 0 0 100%;
  height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 30px;
  overflow: hidden;
}
.pw__slide > * { position: relative; z-index: 1; }
/* coloured grounds */
.pw__slide--patterns { background: #8674B0; }
.pw__slide--triggers { background: #6E8C71; }
.pw__slide--habits   { background: #D98C6B; }
/* subtle white patterns (::before) */
.pw__slide::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}
.pw__slide--patterns::before {        /* diagonal weave (grid) */
  background:
    repeating-linear-gradient(45deg,  rgba(255,255,255,0.09) 0 1.3px, transparent 1.3px 30px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.09) 0 1.3px, transparent 1.3px 30px);
}
.pw__slide--triggers::before {        /* dots */
  background: radial-gradient(rgba(255,255,255,0.11) 3px, transparent 3.5px) 0 0 / 26px 26px;
}
.pw__slide--habits::before {          /* concentric rings, top-right */
  background: repeating-radial-gradient(circle at 84% 20%,
    transparent 0 22px, rgba(255,255,255,0.12) 22px 23.5px, transparent 23.5px 24px);
}
.pw__title {
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: var(--tracking-snug);
  text-align: center;
  margin: 0;
}

/* ---------- shared mock-card bits ---------- */
.pw-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.16);
  padding: 14px 16px;
}
.pw-card__h {
  font-size: 12px;
  font-weight: 700;
  color: #221E27;
  margin: 0 0 12px;
}

/* ---------- slide 1: calendar of progress rings ---------- */
.pw-cal { width: 268px; transform: rotate(2deg); }
.pw-cal__grid { display: flex; flex-wrap: wrap; gap: 9px; }
.pw-ring {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 360deg), #E7EAE4 0);
  position: relative;
}
.pw-ring::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: #fff;
  border-radius: 50%;
}

/* ---------- slide 2: top-triggers bars ---------- */
.pw-trig { width: 244px; transform: rotate(-1.7deg); }
.pw-trow { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.pw-trow:last-child { margin-bottom: 0; }
.pw-trow .emo { font-size: 16px; line-height: 1; }
.pw-bar {
  flex: 1;
  height: 9px;
  border-radius: 9px;
  background: #EDEFEA;
  overflow: hidden;
}
.pw-bar i { display: block; height: 100%; border-radius: 9px; background: var(--c); width: var(--w); }
.pw-pct { font-size: 12px; font-weight: 700; color: #221E27; min-width: 30px; text-align: right; }

/* ---------- slide 3: fanned habit cards ---------- */
.pw-fan { position: relative; width: 312px; height: 210px; }
.pw-fan > .pw-card { position: absolute; padding: 13px; }
.pw-fiber { top: 60px; left: 2px;  width: 146px; transform: rotate(-6.9deg); }
.pw-water { top: 42px; right: 0;   width: 146px; transform: rotate(6.3deg); }
.pw-steps { top: 132px; left: 74px; width: 188px; transform: rotate(1.7deg); }
.pw-ringbig {
  width: 58px; height: 58px; margin: 4px auto 8px;
  border-radius: 50%;
  background: conic-gradient(#54AE3D calc(0.9 * 360deg), #EDEFEA 0);
  position: relative;
  display: grid; place-items: center;
}
.pw-ringbig::after { content: ''; position: absolute; inset: 6px; background: #fff; border-radius: 50%; }
.pw-ringbig span { position: relative; z-index: 1; font-size: 11px; font-weight: 800; color: #221E27; }
.pw-mid { text-align: center; font-size: 12px; font-weight: 700; color: #221E27; }
.pw-water__dots { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 8px; }
.pw-water__dots i { width: 14px; height: 14px; border-radius: 50%; }
.pw-steps__bars { display: flex; align-items: flex-end; gap: 4px; height: 32px; margin-top: 8px; }
.pw-steps__bars i { flex: 1; border-radius: 3px; }

/* ---------- dot indicators ---------- */
.pw__dots { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.pw__dots b {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #E7EAE4;
  cursor: pointer;
  transition: width 0.22s var(--anim-ease), background 0.22s;
}
.pw__dots b.is-active { width: 18px; background: #6E8C71; }

/* ---------- Mobile: scale the fixed-width mock cards to fit ---------- */
@media (max-width: 480px) {
  .pw__slide { height: 400px; padding: 26px 14px; gap: 24px; }
  .pw__title { font-size: 1.3rem; }
  .pw-cal  { transform: rotate(2deg)   scale(0.80); }
  .pw-trig { transform: rotate(-1.7deg) scale(0.88); }
  .pw-fan  { transform: scale(0.76); }
}
@media (max-width: 360px) {
  .pw-cal  { transform: rotate(2deg)   scale(0.72); }
  .pw-trig { transform: rotate(-1.7deg) scale(0.80); }
  .pw-fan  { transform: scale(0.66); }
}
