/* ==========================================================================
   LyricBingo V2 — Upgrade paths, locks & premium (Pro design system)
   ========================================================================== */

/* ── Plan ribbon ── */
.v2-plan-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  margin-bottom: 24px;
  border-radius: 12px;
  border: 1px solid var(--pro-border, rgba(255, 255, 255, 0.08));
  background: var(--pro-elevated, #181818);
}

.v2-plan-ribbon.is-premium {
  border-color: rgba(200, 248, 48, 0.35);
  background: linear-gradient(90deg, var(--pro-elevated, #181818), rgba(200, 248, 48, 0.06));
}

.v2-plan-ribbon > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--pro-muted, #b3b3b3);
}

.v2-plan-ribbon__cta {
  border: 0;
  border-radius: 500px;
  padding: 10px 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--pro-accent-text, #000);
  background: var(--pro-accent, #c8f830);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}

.v2-plan-ribbon__cta:hover {
  transform: scale(1.03);
  background: var(--pro-accent-hover, #d0f830);
}

/* ── Locked playlist cards ── */
.v2-card-art-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.v2-card--locked {
  border-color: var(--pro-border, rgba(255, 255, 255, 0.08)) !important;
}

.v2-card--locked .v2-art {
  filter: blur(4px) saturate(0.5);
  transform: scale(1.03);
}

.v2-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
  text-align: center;
}

.v2-lock-icon {
  font-size: 0;
  width: 32px;
  height: 32px;
}

.v2-lock-overlay strong {
  font-family: var(--v2-font);
  font-size: 14px;
  font-weight: 700;
}

.v2-pill.locked {
  background: var(--pro-accent-2-dim, rgba(139, 92, 246, 0.14)) !important;
  color: var(--pro-accent-2, #8b5cf6) !important;
}

/* ── Library upgrade strip ── */
.v2-library-upsell {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: clamp(24px, 4vw, 32px);
  margin-bottom: 28px;
  border-radius: 12px;
  border: 1px solid var(--pro-border, rgba(255, 255, 255, 0.08));
  background: var(--pro-elevated, #181818);
}

.v2-library-upsell h2 {
  margin: 0 0 8px;
  font-family: var(--v2-font);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.v2-library-upsell p {
  margin: 0;
  color: var(--pro-muted, #b3b3b3);
  max-width: 52ch;
  line-height: 1.55;
}

.v2-library-upsell__count {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 12px;
  border-radius: 500px;
  font-size: 12px;
  font-weight: 700;
  background: var(--pro-accent-2-dim, rgba(139, 92, 246, 0.14));
  color: var(--pro-accent-2, #8b5cf6);
}

/* ── Unlock panel ── */
.v2-unlock-panel {
  margin-top: 20px;
  padding: 22px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: var(--pro-elevated, #181818);
}

.v2-unlock-panel h3 {
  margin: 0 0 8px;
  font-family: var(--v2-font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.v2-unlock-panel p {
  margin: 0 0 16px;
  color: var(--pro-muted, #b3b3b3);
}

.v2-unlock-panel ul {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.v2-unlock-panel li::before {
  content: "✓ ";
  color: var(--pro-accent, #c8f830);
  font-weight: 700;
}

/* ── Tier cards ── */
.v2-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.v2-tier-card {
  position: relative;
  padding: 22px 20px;
  border-radius: 12px;
  border: 1px solid var(--pro-border, rgba(255, 255, 255, 0.08));
  background: var(--pro-elevated, #181818);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.v2-tier-card:hover {
  transform: translateY(-2px);
  background: var(--pro-hover, #282828);
}

.v2-tier-card.is-featured {
  border-color: rgba(200, 248, 48, 0.4);
  box-shadow: inset 0 0 0 1px rgba(200, 248, 48, 0.08);
}

.v2-tier-card.is-current {
  background: var(--pro-hover, #282828);
  border-color: var(--pro-border-strong, rgba(255, 255, 255, 0.14));
}

.v2-tier-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--pro-accent-dim, rgba(200, 248, 48, 0.14));
  color: var(--pro-accent, #c8f830);
}

.v2-tier-card h3 {
  margin: 0;
  font-family: var(--v2-font);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.v2-tier-card em {
  font-style: normal;
  font-size: 20px;
  font-weight: 700;
  color: var(--pro-accent, #c8f830);
}

.v2-tier-card p {
  margin: 0;
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  color: var(--pro-muted, #b3b3b3);
}

.v2-tier-card .v2-btn {
  width: 100%;
  margin-top: auto;
}

/* ── Feature matrix ── */
.v2-feature-matrix {
  padding: 22px;
  border-radius: 12px;
  border: 1px solid var(--pro-border, rgba(255, 255, 255, 0.08));
  background: var(--pro-elevated, #181818);
  margin-bottom: 28px;
}

.v2-feature-matrix > h2 {
  margin: 0 0 16px;
  font-family: var(--v2-font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.v2-feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--pro-border, rgba(255, 255, 255, 0.08));
}

.v2-feature-row:last-child {
  border-bottom: none;
}

.v2-feature-row strong {
  display: block;
  font-size: 15px;
}

.v2-feature-row p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--pro-muted, #b3b3b3);
}

.v2-feature-on {
  font-size: 12px;
  font-weight: 700;
  color: var(--pro-accent, #c8f830);
}

/* ── Account tiles ── */
.v2-account-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.v2-account-tile {
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--pro-border, rgba(255, 255, 255, 0.08));
  background: var(--pro-elevated, #181818);
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

button.v2-account-tile {
  width: 100%;
}

.v2-account-tile:hover {
  border-color: var(--pro-border-strong, rgba(255, 255, 255, 0.14));
  background: var(--pro-hover, #282828);
  transform: translateY(-2px);
}

.v2-account-tile.is-locked {
  border-style: dashed;
  border-color: rgba(139, 92, 246, 0.3);
}

.v2-account-tile__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--pro-hover, #282828);
  margin-bottom: 12px;
  font-size: 0;
}

.v2-account-tile h3 {
  margin: 0 0 6px;
  font-family: var(--v2-font);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.v2-account-tile p {
  margin: 0;
  font-size: 14px;
  color: var(--pro-muted, #b3b3b3);
  line-height: 1.45;
}

.v2-account-tile__tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pro-accent-2, #8b5cf6);
}

/* ── Analytics gate ── */
.v2-analytics-gate {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--pro-border, rgba(255, 255, 255, 0.08));
  min-height: 420px;
  background: var(--pro-elevated, #181818);
}

.v2-analytics-gate__blur {
  position: absolute;
  inset: 0;
  padding: 32px;
  filter: blur(6px);
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}

.v2-analytics-gate__mock div {
  height: 100px;
  border-radius: 12px;
  background: var(--pro-hover, #282828);
}

.v2-analytics-gate__mock-bar {
  height: 200px;
  border-radius: 12px;
  background: var(--pro-card, #1e1e1e);
}

.v2-analytics-gate__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(48px, 8vw, 72px) 28px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.6) 30%);
}

.v2-analytics-gate__content h2 {
  margin: 16px 0 10px;
  font-family: var(--v2-font);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.v2-analytics-gate__content p {
  margin: 0 0 24px;
  max-width: 46ch;
  color: var(--pro-muted, #b3b3b3);
  line-height: 1.55;
}

.v2-analytics-gate__perks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.v2-analytics-gate__perks span {
  padding: 8px 14px;
  border-radius: 500px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--pro-border, rgba(255, 255, 255, 0.08));
  background: var(--pro-hover, #282828);
  color: var(--pro-muted, #b3b3b3);
}

/* ── Analytics live ── */
.v2-analytics-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.v2-analytics-stat {
  padding: 24px 20px;
  border-radius: 12px;
  text-align: left;
  border: none;
  background: var(--pro-elevated, #181818);
  transition: transform 0.15s ease, background 0.15s ease;
}

.v2-analytics-stat:hover {
  transform: translateY(-2px);
  background: var(--pro-hover, #282828);
}

.v2-analytics-stat span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--pro-subtle, #6a6a6a);
  margin-bottom: 10px;
}

.v2-analytics-stat b {
  display: block;
  font-family: var(--v2-font);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  line-height: 1;
  color: var(--pro-text, #fff);
}

.v2-analytics-stat:nth-child(1) b { color: var(--pro-accent, #c8f830); }
.v2-analytics-stat:nth-child(2) b { color: var(--pro-accent-2, #8b5cf6); }
.v2-analytics-stat:nth-child(3) b { color: var(--pro-text, #fff); }

.v2-analytics-feed {
  display: grid;
  gap: 8px;
}

.v2-analytics-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-radius: 12px;
  border: none;
  background: var(--pro-elevated, #181818);
  transition: background 0.15s ease;
}

.v2-analytics-item:hover {
  background: var(--pro-hover, #282828);
}

.v2-analytics-item h3 {
  margin: 0 0 4px;
  font-family: var(--v2-font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.v2-analytics-item p {
  margin: 0;
  font-size: 13px;
  color: var(--pro-muted, #b3b3b3);
}

.v2-analytics-item__nums {
  display: flex;
  gap: 20px;
  text-align: center;
}

.v2-analytics-item__nums div em {
  display: block;
  font-style: normal;
  font-family: var(--v2-font);
  font-size: 18px;
  font-weight: 700;
  color: var(--pro-accent, #c8f830);
  line-height: 1;
}

.v2-analytics-item__nums div span {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pro-subtle, #6a6a6a);
}

.v2-analytics-item__actions {
  display: flex;
  gap: 8px;
}

/* ── Premium band ── */
.v2-premium-band {
  padding: clamp(28px, 4vw, 36px);
  border-radius: 12px;
  border: 1px solid var(--pro-border, rgba(255, 255, 255, 0.08));
  background: var(--pro-elevated, #181818);
  margin-top: 28px;
}

.v2-premium-band h2 {
  margin: 0 0 8px;
  font-family: var(--v2-font);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.v2-premium-band p {
  margin: 0 0 20px;
  color: var(--pro-muted, #b3b3b3);
  max-width: 50ch;
}

.v2-premium-perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.v2-premium-perks div {
  padding: 14px;
  border-radius: 8px;
  background: var(--pro-card, #1e1e1e);
  border: 1px solid var(--pro-border, rgba(255, 255, 255, 0.08));
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .v2-tier-grid,
  .v2-premium-perks,
  .v2-analytics-hero-stats {
    grid-template-columns: 1fr;
  }

  .v2-library-upsell {
    grid-template-columns: 1fr;
  }

  .v2-account-grid {
    grid-template-columns: 1fr;
  }

  .v2-analytics-item {
    grid-template-columns: 1fr;
  }

  .v2-analytics-item__nums {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .v2-analytics-item__actions {
    width: 100%;
  }

  .v2-analytics-item__actions .v2-btn {
    flex: 1;
  }
}

/* ── PayPal checkout modal polish (V2 + account) ── */
.bd-upgrade-modal-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bd-upgrade-modal-sparkles span {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.45;
  animation: bd-sparkle-float 6s ease-in-out infinite;
}

.bd-upgrade-modal-sparkles span:nth-child(1) {
  top: -20px;
  left: -10px;
  background: rgba(200, 248, 48, 0.35);
}

.bd-upgrade-modal-sparkles span:nth-child(2) {
  top: 20%;
  right: -30px;
  background: rgba(139, 92, 246, 0.28);
  animation-delay: -2s;
}

.bd-upgrade-modal-sparkles span:nth-child(3) {
  bottom: -30px;
  left: 35%;
  background: rgba(255, 196, 0, 0.22);
  animation-delay: -4s;
}

@keyframes bd-sparkle-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-8px) scale(1.06);
    opacity: 0.7;
  }
}

.bd-billing-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.bd-billing-trust span {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  color: var(--pro-muted, #c8bddf);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.bd-billing-paypal-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  margin-right: 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #003087;
  background: #ffc439;
  vertical-align: middle;
}

.bd-billing-option--featured .bd-billing-option-price {
  color: #c8f830;
}

.bd-billing-option:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.v2-lock-overlay .v2-btn {
  min-width: 120px;
  box-shadow: 0 8px 24px rgba(200, 248, 48, 0.25);
}

.v2-unlock-panel .v2-btn.primary {
  box-shadow: 0 10px 28px rgba(200, 248, 48, 0.28);
}

.wx-price .wx-btn[data-bd-subscribe],
.wx-price button[data-bd-subscribe] {
  width: 100%;
  justify-content: center;
}



/* ── Upgrade checkout modal: fit viewport, no clipped plan cards ── */
.bd-upgrade-modal {
  padding: clamp(12px, 2vw, 24px);
  overflow: hidden;
}

.bd-upgrade-modal-card.bd-billing-card,
.bd-upgrade-modal-card--checkout {
  width: min(calc(100vw - 2rem), 56rem);
  max-width: calc(100vw - 2rem);
  max-height: min(calc(100vh - 2rem), 920px);
  overflow-x: hidden;
  overflow-y: auto;
}

.bd-billing-options.bd-billing-options--four {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  margin: 1rem 0 0.75rem;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.bd-billing-options--four .bd-billing-option {
  flex: 0 0 min(168px, 42vw);
  min-width: 148px;
  scroll-snap-align: start;
}

@media (max-width: 520px) {
  .bd-billing-options.bd-billing-options--four {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .bd-billing-options--four .bd-billing-option {
    flex: 1 1 calc(50% - 0.375rem);
    min-width: 0;
  }
}

@media (max-width: 380px) {
  .bd-billing-options--four .bd-billing-option {
    flex: 1 1 100%;
  }
}
