/* Unfollower Tracker - Onboarding Styles */
@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/Poppins-Thin.ttf") format("truetype");
  font-weight: 100;
  font-display: block;
}
@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/Poppins-ExtraLight.ttf") format("truetype");
  font-weight: 200;
  font-display: block;
}
@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/Poppins-Light.ttf") format("truetype");
  font-weight: 300;
  font-display: block;
}
@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: block;
}
@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/Poppins-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.onboarding-page-root {
  --onb-w: calc(min(100vw, 412px) / 412px);
  --onb-h: calc(min(100svh, 915px) / 915px);
  --onb-s: min(1, calc(100vw / 412px), calc(100svh / 915px));
  --onb-accent: #0061E7;
  --onb-text: #ffffff;
  --onb-outline: rgba(255, 255, 255, 0.45);
  background-color: #0061E7;

  margin: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--onb-text);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.onboarding-app {
  width: 100%;
  max-width: 412px;
  min-height: 100svh;
  min-height: 100dvh;
  height: 100svh;
  height: 100dvh;
  flex-shrink: 0;
  margin: 0;
  padding-top: 32px;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}

.onboarding-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding-left: 0;
  padding-right: 0;
}

.onboarding-page {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  text-align: left;
  overflow: hidden;
}

.onboarding-page.is-active {
  display: flex;
}

.splash-badge {
  color: #ffffff;
  font-weight: 300;
  letter-spacing: 0.6px;
  background: transparent;
  border: 0;
}

.splash-badge .num {
  font-weight: 600;
  margin-right: 4px;
}

.feature-chip {
  border-radius: 10px;
  color: #022DC6; /* c8Color — deep blue */
  background: #00EEFF; /* c2Color cyan, default; pages override */
  font-weight: 600;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 75%;
}

.feature-chip--cyan { background: #00EEFF; }
.feature-chip--lemon { background: #F7FFAD; }
.feature-chip--pink { background: #FFBBBA; }

.feature-chip .chip-icon {
  /* Flutter: 24.h × 1.127 = 27; use 22 for balanced web display */
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.onboarding-copy {
  width: 100%;
  padding: 0 calc(48px * var(--onb-s));
  text-align: left;
  box-sizing: border-box;
}

.onboarding-title {
  margin: 0;
  color: #ffffff;
  font-size: calc(40px * var(--onb-s));
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 600;
  white-space: pre-line;
  text-align: left;
}

.onboarding-subtitle {
  margin: 13px 0 0;
  color: #ffffff;
  font-size: calc(20px * var(--onb-s));
  line-height: 1.15;
  font-weight: 400;
  white-space: normal;
  text-align: left;
  max-width: 100%;
}

/* ── Splash ── */
.onboarding-page--splash.is-active {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  padding-top: 24px;
}

.splash-badge {
  margin: 12px auto 16px;
  display: block;
  width: auto;
  max-width: 90%;
  padding: 0 16px;
  font-size: calc(22px * var(--onb-s));
  line-height: 1.1;
  letter-spacing: 0.8px;
  white-space: pre-line;
  text-align: center;
  font-weight: 200;
  color: #ffffff;
  flex: 0 0 auto;
}

.splash-badge .num {
  font-weight: 600;
  letter-spacing: 0.8px;
  margin-right: 2px;
}

.splash-start-badge {
  width: auto;
  height: calc(101px * var(--onb-s));
  max-width: calc(251px * var(--onb-s));
  display: block;
  margin: 0 auto;
  object-fit: contain;
  flex-shrink: 0;
}

.onboarding-media-stack--splash {
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 22px 0 0;
  overflow: hidden;
  gap: calc(37px * var(--onb-s));
  flex: 1 1 auto;
}

.onboarding-media--splash {
  width: auto;
  height: calc(240px * var(--onb-s));
  max-width: 88vw;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  flex-shrink: 1;
  min-height: 0;
  margin: 0 auto;
}

.onboarding-page--splash .onboarding-copy {
  margin-top: calc(31px * var(--onb-s));
  margin-bottom: 0;
  align-self: stretch;
  flex: 0 0 auto;
}

.onboarding-page--splash .onboarding-title {
  font-size: calc(32px * var(--onb-s));
}

.onboarding-page--splash .onboarding-subtitle {
  /* Flutter SizedBox(12.h) = 13.5px gap */
  margin-top: 14px;
}

/* ── Feature pages ── */
.onboarding-page--feature.is-active {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  padding-top: 0;
}

.onboarding-page--feature .onboarding-media-stack {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  max-height: calc(503px * var(--onb-s));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  align-self: stretch;
}

.onb-spacer-1 { flex: 2.5 2.5 0; min-height: 0; }
.onb-spacer-2 { flex: 2 2 0; min-height: 0; }

.onboarding-page--feature .onboarding-copy {
  margin-top: calc(32px * var(--onb-s));
  flex: 0 0 auto;
}

.media-frame {
  position: relative;
  width: calc(100% - (88px * var(--onb-w)));
  height: calc(366px * var(--onb-s));
  max-height: 100%;
  margin: 0 calc(44px * var(--onb-s));
  line-height: 0;
  flex-shrink: 1;
  display: block;
  overflow: visible;
}

.onboarding-page--feature .onboarding-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.feature-chip {
  /* Flutter chip padding 14.w x 7.h = 15.4 x 7.9, font 12sp = 13.2px, br 10.r = 11 */
  padding: 8px 15px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  border-radius: 11px;
  white-space: normal;
  position: absolute;
  bottom: -10px;
  left: 0;
  max-width: 230px;
  z-index: 2;
}

/* Last feature: Flutter wraps image in horizontal padding 44.w */
.onboarding-page--last-feature .media-frame {
  width: calc(100% - (88px * var(--onb-w)));
  margin: 0 calc(44px * var(--onb-s));
  height: calc(398px * var(--onb-s));
  max-height: 100%;
}

/* Last feature page: 3 pills positioned over image inside .media-frame */
.last-feature-pill {
  /* Flutter: padding 14.w×7.h=15×8, font 12.sp=13, br 10.r=11 */
  position: absolute;
  padding: 8px 15px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  border-radius: 11px;
  color: #022DC6; /* c8Color */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 230px;
  z-index: 2;
}

.last-feature-pill .chip-icon {
  /* Flutter: 24.h × 1.127 = 27; use 22 to match feature chip icon */
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.last-feature-pill--top {
  top: 8px;
  left: -8px;
  background: #F7FFAD;
}

.last-feature-pill--middle {
  top: 40%;
  right: -8px;
  background: #FFBBBA;
}

.last-feature-pill--bottom {
  bottom: -8px;
  left: -8px;
  background: #00EEFF;
}

.onboarding-page--feature .onboarding-subtitle {
  /* Flutter SizedBox(height: 12.h) = 13.5px */
  margin-top: 14px;
}

/* ── Social Proof ── */
.onboarding-page--social-proof.is-active {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  padding-top: 16px;
}

.onboarding-page--social-proof .onboarding-media-stack {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(503px * var(--onb-s));
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 44px;
}

.social-proof-banner {
  /* Flutter: height 0.05h clamped to 100 = 46px on Pixel 9 */
  flex: 0 0 auto;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px; /* Flutter SizedBox(20.h = 22) */
  padding: 0 33px; /* Flutter Padding horizontal 30.w = 33 */
}
.social-proof-banner img {
  max-height: 46px;
  width: auto;
  object-fit: contain;
}

.social-proof-list {
  /* Smooth auto-scroll like Flutter (10px/sec via ListView) */
  flex: 1 1 auto;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 6%, black 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 6%, black 94%, transparent 100%);
}

.social-proof-track {
  display: flex;
  flex-direction: column;
  gap: 17px; /* Flutter bottom: 15.h = 17 */
  animation: sp-scroll 40s linear infinite;
  will-change: transform;
}

@keyframes sp-scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

.proof-card {
  /* Flutter: padding 18.w/13.h/18.w/17.h = 20/15/20/19, br ~12, white 0.2→0.3 gradient */
  background: linear-gradient(160deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.30) 100%);
  border-radius: 12px;
  padding: 15px 20px 19px;
  color: #ffffff;
}
.proof-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.stars { color: #FFC107; font-size: 12px; letter-spacing: 1px; }
.proof-name {
  /* Flutter: 11.sp w700, color buttonColor=white */
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: #ffffff;
}
.proof-avatar {
  /* Flutter: 26.h × 1.127 = 29, white.withOpacity(0.2) */
  display: inline-flex; align-items: center; justify-content: center;
  width: 29px; height: 29px; border-radius: 50%;
  background: rgba(255,255,255,0.2); font-style: normal;
  font-size: 12px; font-weight: 500;
}
.proof-card p {
  /* Flutter: 11.sp w500 white, line-height 1.3 */
  margin: 0; font-size: 12px; font-weight: 500; line-height: 1.3;
}

.onboarding-page--social-proof .onboarding-copy {
  margin-top: calc(20px * var(--onb-s));
  flex: 0 0 auto;
}

.onboarding-page--social-proof .onboarding-title {
  font-size: calc(37px * var(--onb-s));
}

/* ── Paywall TypeG — Flutter Stack layout ──
   Stack:
     - Container(maxHeight: 0.6h) with image BoxFit.cover → edge-to-edge
     - Padding(horizontal: 20.w) + Column(
         Spacer(flex:10),
         animated (title+dots),
         Spacer(flex:1),
         3 cards horizontal,
         SizedBox(20.h)
       )
   Image goes under status bar (no SafeArea on Stack).
*/
.onboarding-page--paywall-typeg.is-active {
  display: block;
  position: relative;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

/* Paywall step: remove status-bar top padding so image extends to viewport top */
body:has(#step-7.is-active) .onboarding-app {
  padding-top: 0;
}

.paywall-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 50dvh;
  max-height: 50dvh;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 85%, transparent 100%);
          mask-image: linear-gradient(to bottom, black 0%, black 85%, transparent 100%);
}

/* Content overlay with Flutter's 20.w horizontal padding */
.paywall-animated,
.onboarding-page--paywall-typeg .paywall-plan-row {
  position: relative;
  z-index: 1;
}

.paywall-animated {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(250px * var(--onb-s));
  padding: 0 calc(22px * var(--onb-s));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  z-index: 2;
}

.paywall-anim-slot {
  min-height: calc(91px * var(--onb-s));
  padding-top: calc(15px * var(--onb-s));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

.paywall-anim-title {
  margin: 0;
  color: #ffffff;
  font-size: calc(22px * var(--onb-s));
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  transition: opacity 0.4s ease;
}

.paywall-anim-feature {
  margin: 8px 0 0;
  color: #ffffff;
  font-size: calc(13px * var(--onb-s));
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  transition: opacity 0.4s ease;
}

.paywall-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 0;
}

.pill-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 4px;
  transition: width 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}
.pill-dot.active {
  width: 26px;
  background: #00EEFF;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

/* ── Paywall (generic/fallback) ── */
.onboarding-page--paywall {
  flex-direction: column;
}

.onboarding-page--paywall.is-active:not(.onboarding-page--paywall-typeg) {
  display: grid;
  grid-template-rows: auto minmax(max-content, 1fr) auto;
  align-items: stretch;
  min-height: 0;
}

.onboarding-page--paywall-typeg .paywall-plan-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(10px * var(--onb-s));
  padding: 0 calc(48px * var(--onb-s));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(6px * var(--onb-s));
  margin: 0;
}

/* 3-column plan grid */
.paywall-plan-row {
  grid-row: 3;
  flex: 0 0 auto;
  width: 100%;
  margin-top: 0;
  padding-top: calc(8px * var(--onb-scale));
  padding-bottom: calc(10px * var(--onb-scale));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(7px * var(--onb-scale));
}

.paywall-plan-card {
  position: relative;
  width: 100%;
  min-height: calc(171px * var(--onb-s));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  border-radius: 15px;
  border: 0;
  background: rgba(255, 255, 255, 0.3);
  padding: 13px 0 16px;
  cursor: pointer;
  color: #ffffff;
  text-align: center;
  user-select: none;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.paywall-plan-card:hover {
  transform: translateY(-1px);
}

.paywall-plan-card.active {
  background: #ffffff;
  color: #0061E7; /* mainColor */
}

.paywall-plan-card input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.paywall-card-badge {
  /* Flutter: Container minWidth/Height 35.h=39.5 — bumped to 44 to match visual height */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.paywall-card-badge-label {
  /* Flutter: padding 6.w × 4.h = 7×5, br 9.r=10, 10.sp=11px */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 5px 8px;
  background: #D1AD66; /* premiumColor */
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.paywall-card-badge-label:empty {
  display: none;
}

.paywall-card-name,
.paywall-card-price {
  margin: 0;
  font-size: calc(18px * var(--onb-s));
  font-weight: 600;
  line-height: 1.1;
}

.paywall-card-name { margin-top: 13px; }
.paywall-card-price { margin-top: 9px; }

.paywall-card-divider {
  /* Sub-pixel hairline: browser floors <1px to 1px, so force via scaleY */
  width: calc(100% - 14px);
  height: 1px;
  background: currentColor;
  margin-top: 13px;
  opacity: 0.6;
  transform: scaleY(0.5);
  transform-origin: center center;
}

.paywall-card-meta {
  display: block;
  margin-top: 13px;
  padding: 0 3px;
  font-size: calc(12px * var(--onb-s));
  font-weight: 500;
  line-height: 1.1;
}

/* ── Footer CTA ── */
.onboarding-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: calc(48px * var(--onb-s));
  padding-right: calc(48px * var(--onb-s));
  padding-top: 13px;
  padding-bottom: calc(60px * var(--onb-s));
  flex: 0 0 auto;
}

.cta-progress {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
  margin-bottom: 2px;
}
.cta-progress.is-visible { opacity: 1; }
.cta-progress-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
.cta-progress.is-error .cta-progress-spinner { display: none; }
.cta-progress-text {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.01em;
  text-align: center;
}
.cta-progress.is-error .cta-progress-text { color: #ffd8db; }
.cta-progress.is-success .cta-progress-text { color: #d3ffe4; }
@keyframes spin { to { transform: rotate(360deg); } }

.onboarding-footer #status { display: none !important; }

#ctaBtn {
  /* Flutter ReusableButton: text centered, arrow pinned to right edge */
  position: relative;
  width: 100%;
  min-height: 68px;
  border: 0;
  border-radius: 11px;
  background: #ffffff;
  color: #0061E7;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  cursor: pointer;
}

#ctaBtn::after {
  content: "";
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
  width: 18px;
  height: 18px;
  background-color: #0061E7;
  -webkit-mask: url("/assets/svg/arrow.svg") center / contain no-repeat;
          mask: url("/assets/svg/arrow.svg") center / contain no-repeat;
}

#ctaBtn:hover {
  background: #f5faff;
}

#ctaBtn:disabled {
  opacity: 0.6;
  cursor: default;
}
#ctaBtn:disabled::after {
  opacity: 0.5;
}

.notice {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(15, 5, 40, 0.35);
  color: #e8e0ff;
  font-size: calc(13px * var(--onb-scale));
  line-height: 1.35;
  padding: calc(9px * var(--onb-scale)) calc(11px * var(--onb-scale));
}

.notice.error {
  border-color: rgba(255, 107, 107, 0.55);
  color: #ffd8db;
}

.notice.success {
  border-color: rgba(74, 222, 128, 0.55);
  color: #d3ffe4;
}

.hidden {
  display: none !important;
}

/* Transform:scale handles responsive sizing; no per-viewport overrides needed below 720px */

@media (min-width: 720px) {
  body.onboarding-page-root {
    --onb-w: 1;
    --onb-s: min(1, calc((100svh - 48px) / 915px));
    background: radial-gradient(1200px 800px at 50% -10%, #1f7bf0 0%, #0061E7 55%, #0050bf 100%);
    padding: clamp(16px, 3vh, 40px) 0;
    align-items: center;
  }
  .onboarding-app {
    max-width: 412px;
    min-height: min(915px, calc(100svh - 48px));
    height: min(915px, calc(100svh - 48px));
    max-height: min(915px, calc(100svh - 48px));
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
      0 30px 80px rgba(0, 0, 20, 0.35),
      0 12px 32px rgba(0, 0, 20, 0.25),
      inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    position: relative;
  }
}
