/* ============================================================
   membership.css — Phone auth tabs, referral card, upgrade extras
   Loaded AFTER plans.css so it can override where needed.
   ============================================================ */

/* ────────── AUTH MODE TABS (Email / Phone) ────────── */
.auth-tabs {
  display: flex;
  gap: var(--s2);
  padding: var(--s1);
  margin-bottom: var(--s5);

  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
}

.auth-tab {
  flex: 1;
  width: auto;
  min-height: 40px;
  padding: var(--s2) var(--s3);

  background: transparent;
  color: var(--text-secondary);
  border: 0;
  border-radius: var(--r-sm);

  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;

  box-shadow: none;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}

.auth-tab::before { display: none; }

.auth-tab:hover {
  background: var(--bg-overlay);
  color: var(--text-primary);
  transform: none;
}

.auth-tab.is-active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--bg-base);
  box-shadow: var(--shadow-sm), 0 0 12px var(--gold-glow);
}

/* Invisible reCAPTCHA container — must be in the DOM, but not visible */
#recaptcha-container {
  height: 0;
  overflow: hidden;
}

/* Phone number field has no left icon (unlike email/password) so no padding */
#lPhone,
#lOtp {
  padding-left: var(--s4);
}

/* ────────── REFERRAL CARD (inside upgrade modal) ────────── */
.referral-card {
  margin-top: var(--s6);
  padding: var(--s5);

  background: linear-gradient(135deg, var(--emerald-wash), transparent);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-left: 3px solid var(--emerald);
  border-radius: var(--r-lg);
}

.referral-head {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s2);
  color: var(--text-primary);
  font-size: var(--fs-body);
}

.referral-head .ico { color: var(--emerald); }

.referral-sub {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-bottom: var(--s4);
  line-height: var(--lh-relaxed);
}

.referral-code-row {
  display: flex;
  gap: var(--s2);
  align-items: stretch;
  margin-bottom: var(--s3);
  flex-wrap: wrap;
}

.referral-code {
  flex: 1 1 auto;
  min-width: 140px;

  font-family: var(--font-mono);
  font-size: var(--fs-large);
  font-weight: var(--fw-bold);
  letter-spacing: 0.25em;

  padding: var(--s3) var(--s4);
  text-align: center;

  background: var(--bg-base);
  color: var(--emerald);
  border: 1px dashed var(--emerald);
  border-radius: var(--r-md);

  user-select: all;
  -webkit-user-select: all;
}

.referral-card .mini {
  width: auto;
  min-height: 44px;
  padding: 0 var(--s4);
  flex: 0 0 auto;
}

.referral-count {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s2) 0;
  border-top: 1px solid rgba(16, 185, 129, 0.2);
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

.referral-count b {
  font-family: var(--font-mono);
  font-size: var(--fs-lead);
  color: var(--emerald);
}

.referral-apply {
  margin-top: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid rgba(16, 185, 129, 0.2);
}

.referral-apply > summary {
  cursor: pointer;
  font-size: var(--fs-small);
  color: var(--gold);
  font-weight: var(--fw-semibold);
  padding: var(--s1) 0;
  list-style: none;
}

.referral-apply > summary::-webkit-details-marker { display: none; }

.referral-apply > summary::before {
  content: "+";
  display: inline-block;
  width: 16px;
  color: var(--gold);
  font-family: var(--font-mono);
  transition: transform var(--t-fast) var(--ease-out);
}

.referral-apply[open] > summary::before {
  content: "−";
}

/* ────────── PLAN BADGE (button, opens modal) ────────── */
button.plan-badge {
  width: auto;
  min-height: 32px;
  padding: 4px 12px;
  box-shadow: none;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}

button.plan-badge::before { display: none; }

button.plan-badge:hover {
  transform: translateY(-1px) scale(1.03);
}

button.plan-badge.plan-pro {
  box-shadow: 0 0 12px var(--gold-glow);
}

button.plan-badge.plan-pro:hover {
  box-shadow: 0 0 20px var(--gold-glow);
}

/* Trial / subscribe-invite badge — deliberately eye-catching so members
   notice the offer. A soft gold pulse, nothing garish. */
button.plan-badge.plan-trial {
  background: var(--grad-gold, linear-gradient(135deg,#F8E6BB,#E7C173 46%,#C9973F));
  color: var(--gold-ink, #2A1E06);
  font-weight: 800;
  animation: badgePulse 2.2s var(--ease, ease) infinite;
}
@keyframes badgePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(231,193,115,.0); }
  50%     { box-shadow: 0 0 14px 2px rgba(231,193,115,.45); }
}
@media (prefers-reduced-motion: reduce) {
  button.plan-badge.plan-trial { animation: none; }
}
