/* ============================================
   CHECKOUT MODAL — Rich Money signup
   ============================================ */

.checkout-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s var(--ease-out);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.checkout-modal {
  background: #0a0a0a;
  border: 1px solid var(--line);
  border-radius: 24px;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  position: relative;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 200, 100, 0.08);
  animation: slideUp 0.35s var(--ease-out);
}

@keyframes slideUp {
  from { transform: translateY(40px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.checkout-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 50%;
  color: var(--ink-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 18px;
  line-height: 1;
  z-index: 2;
}
.checkout-close:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.checkout-progress {
  display: flex;
  gap: 6px;
  padding: 24px 32px 0;
}
.checkout-progress span {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  transition: background 0.3s;
}
.checkout-progress span.active {
  background: var(--green);
}

.checkout-body {
  padding: 32px 32px 36px;
}

.checkout-eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 12px;
}

.checkout-title {
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 8px;
  font-weight: 500;
}
.checkout-title em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--green);
  font-weight: 400;
}

.checkout-subtitle {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0 0 28px;
}

/* Plan cards (step 1) */
.plan-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}
.plan-pick {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.01);
  transition: all 0.2s;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}
.plan-pick:hover { border-color: var(--ink-3); background: rgba(255, 255, 255, 0.025); }
.plan-pick.selected {
  border-color: var(--green);
  background: rgba(0, 200, 100, 0.05);
  box-shadow: 0 0 0 3px rgba(0, 200, 100, 0.1);
}
.plan-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--ink-3);
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s;
}
.plan-pick.selected .plan-radio {
  border-color: var(--green);
}
.plan-pick.selected .plan-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--green);
  border-radius: 50%;
}
.plan-info { flex: 1; }
.plan-info .plan-pick-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--ink);
}
.plan-info .plan-pick-desc {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.4;
}
.plan-pick-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-feature-settings: 'tnum';
  flex-shrink: 0;
}
.plan-pick-price-trial {
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
}
.plan-pick-price-paid {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}
.plan-pick-price-paid small {
  font-size: 11px;
}
.plan-pick-price-current {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}
.plan-pick-price-current small {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
}
.plan-pick-limits {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 6px;
  line-height: 1.35;
  font-style: italic;
}
.plan-pick-badge {
  position: absolute;
  top: -8px;
  right: 16px;
  font-size: 9px;
  letter-spacing: 0.1em;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 100px;
  text-transform: uppercase;
}
.plan-pick-badge.badge-trial {
  background: var(--green);
  color: #000;
}
.plan-pick-badge.badge-paid {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border: 1px solid var(--line);
}
.plan-pick-badge.badge-featured {
  background: var(--green);
  color: #000;
  box-shadow: 0 4px 16px rgba(0, 200, 100, 0.35);
}

/* Plano destacado (MAIS POPULAR) — borda verde sutil mesmo sem selecionado */
.plan-pick.featured:not(.selected) {
  border-color: rgba(0, 200, 100, 0.3);
  background: rgba(0, 200, 100, 0.025);
}
.plan-pick.featured:not(.selected):hover {
  border-color: rgba(0, 200, 100, 0.5);
}

/* Forms */
.checkout-row {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.checkout-row.two { grid-template-columns: 1fr 1fr; }
.checkout-row.three { grid-template-columns: 1fr 1fr 1fr; }

.field { position: relative; }
.field label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
  display: block;
  font-weight: 500;
}
.field input {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
  transition: all 0.2s;
  outline: none;
}
.field input::placeholder { color: var(--ink-3); }
.field input:focus {
  border-color: var(--green);
  background: rgba(0, 200, 100, 0.04);
}
.field input.invalid {
  border-color: #f33;
  background: rgba(255, 50, 50, 0.04);
}
.field-hint {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
}
.field-error {
  font-size: 12px;
  color: #f55;
  margin-top: 4px;
}

/* Trial pill */
.checkout-trial {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(0, 200, 100, 0.06);
  border: 1px solid rgba(0, 200, 100, 0.18);
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--ink-2);
}
.checkout-trial b { color: var(--ink); font-weight: 600; }
.checkout-trial-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 200, 100, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}

/* Actions */
.checkout-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}
.checkout-actions .btn { flex: 1; justify-content: center; padding: 14px 18px; font-size: 14px; }
.checkout-back {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
  flex: 0 0 auto !important;
  padding: 14px 18px !important;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s;
}
.checkout-back:hover { border-color: var(--ink-3); color: var(--ink); }

.checkout-submit {
  background: var(--green);
  color: #000;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 18px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.checkout-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 200, 100, 0.3); }
.checkout-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Loading */
.checkout-loading {
  text-align: center;
  padding: 40px 20px;
}
.checkout-spinner {
  width: 56px;
  height: 56px;
  border: 3px solid rgba(0, 200, 100, 0.15);
  border-top-color: var(--green);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Success */
.checkout-success {
  text-align: center;
  padding: 24px 20px 8px;
}
.checkout-success-check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 200, 100, 0.12);
  border: 2px solid var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  color: var(--green);
  font-size: 32px;
  animation: pop 0.45s var(--ease-out);
}
@keyframes pop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
.checkout-success h3 {
  font-size: 26px;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.checkout-success h3 em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--green);
  font-weight: 400;
}
.checkout-success p {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0 0 28px;
  line-height: 1.5;
}
.checkout-success .btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--green);
  color: #000;
  padding: 16px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s;
}
.checkout-success .btn-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 200, 100, 0.32);
}

.checkout-error-banner {
  background: rgba(255, 60, 60, 0.08);
  border: 1px solid rgba(255, 60, 60, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #ff8888;
  margin-bottom: 16px;
}

/* Mobile */
@media (max-width: 560px) {
  .checkout-backdrop { padding: 0; align-items: flex-end; }
  .checkout-modal {
    border-radius: 24px 24px 0 0;
    max-height: 92vh;
    max-width: 100%;
  }
  .checkout-progress { padding: 20px 22px 0; }
  .checkout-body { padding: 24px 22px 28px; }
  .checkout-title { font-size: 22px; }
  .checkout-subtitle { font-size: 14px; margin-bottom: 22px; }
  .checkout-row.three { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .field input { padding: 12px 12px; font-size: 16px; } /* 16px previne zoom no iOS */
  .plan-pick { padding: 16px 14px; gap: 10px; }
  .plan-info .plan-pick-name { font-size: 16px; }
  .plan-pick-price-trial { font-size: 14px; }
  .plan-pick-price-paid { font-size: 11px; }
}
