/* ===== PAYMENT MODAL =====
   Reuso dos estilos do step10 do onboarding para abrir o modal de pagamento
   no dashboard (aba Assinatura → Renovar). Mantemos o prefixo .s10-* para
   compartilhar a especificacao visual com o onboarding sem divergencia. */

/* ─── Plan cards ───────────────────────────────────────────────────────── */

.s10-plans-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin: 1.25rem 0 1rem;
}

.s10-plan-card {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1.25rem 1.25rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
  outline: none;
  overflow: hidden;
}

.s10-plan-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: 18px 18px 0 0;
}

.s10-plan-card--mensal { border-color: rgba(100, 149, 237, 0.25); }
.s10-plan-card--mensal::before { background: linear-gradient(90deg, #4B7BEC, #6495ED); }
.s10-plan-card--mensal .s10-plan-price { color: #6AABFF; }
.s10-plan-card--mensal .s10-feature-icon { color: #6AABFF; }
.s10-plan-card--mensal .s10-plan-badge { background: #4B7BEC; color: #fff; }
.s10-plan-card--mensal:hover {
  border-color: rgba(100, 149, 237, 0.55);
  background: rgba(74, 123, 236, 0.06);
}
.s10-plan-card--mensal.s10-plan-card--selected {
  border-color: #6495ED;
  background: rgba(74, 123, 236, 0.10);
  box-shadow: 0 0 0 1px rgba(100,149,237,0.2), 0 4px 20px rgba(74,123,236,0.18);
}

.s10-plan-card--trimestral { border-color: rgba(0, 229, 255, 0.30); }
.s10-plan-card--trimestral::before { background: linear-gradient(90deg, #00B4D8, #00E5FF); }
.s10-plan-card--trimestral .s10-plan-price { color: #00E5FF; }
.s10-plan-card--trimestral .s10-feature-icon { color: #00E5FF; }
.s10-plan-card--trimestral .s10-plan-badge { background: #00E5FF; color: #0A0F1C; }
.s10-plan-card--trimestral:hover {
  border-color: rgba(0, 229, 255, 0.55);
  background: rgba(0, 229, 255, 0.06);
}
.s10-plan-card--trimestral.s10-plan-card--selected {
  border-color: #00E5FF;
  background: rgba(0, 229, 255, 0.10);
  box-shadow: 0 0 0 1px rgba(0,229,255,0.25), 0 4px 24px rgba(0,229,255,0.18);
  transform: scale(1.02);
}

.s10-plan-card--anual { border-color: rgba(251, 191, 36, 0.25); }
.s10-plan-card--anual::before { background: linear-gradient(90deg, #D97706, #FCD34D); }
.s10-plan-card--anual .s10-plan-price { color: #FBBF24; }
.s10-plan-card--anual .s10-feature-icon { color: #FBBF24; }
.s10-plan-card--anual .s10-plan-badge { background: linear-gradient(90deg, #D97706, #F59E0B); color: #fff; }
.s10-plan-card--anual .s10-plan-savings { color: #FBBF24; }
.s10-plan-card--anual:hover {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.06);
}
.s10-plan-card--anual.s10-plan-card--selected {
  border-color: #FBBF24;
  background: rgba(251, 191, 36, 0.10);
  box-shadow: 0 0 0 1px rgba(251,191,36,0.25), 0 4px 20px rgba(251,191,36,0.18);
}

.s10-plan-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.25);
}

.s10-plan-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  margin-bottom: 0.6rem;
}

.s10-plan-name {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-primary, #F5F7FA);
  margin-bottom: 0.35rem;
}

.s10-plan-price-block {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  margin-bottom: 0.2rem;
}

.s10-plan-price {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 1.55rem;
  font-weight: 800;
}

.s10-plan-period {
  font-size: 0.85rem;
  color: var(--color-text-secondary, #94A3B8);
}

.s10-plan-billing {
  font-size: 0.8rem;
  color: var(--color-text-muted, #64748B);
  margin-bottom: 0.25rem;
}

.s10-plan-savings {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4ade80;
  margin-bottom: 0.75rem;
}

.s10-plan-features {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.s10-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--color-text-secondary, #94A3B8);
}

.s10-feature-icon {
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.s10-security {
  font-size: 0.78rem;
  color: var(--color-text-muted, #64748B);
  text-align: center;
  margin-top: 0.25rem;
}

/* ─── Modal shell ──────────────────────────────────────────────────────── */

.s10-modal-open { overflow: hidden; }

.s10-checkout-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(10, 15, 28, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.s10-checkout-modal-overlay.open { display: flex; }

.s10-checkout-modal {
  position: relative;
  width: min(620px, 100%);
  max-height: min(88vh, 840px);
  overflow-y: auto;
  padding: 1.25rem;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 16px;
  background: #0f1629;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 36px rgba(0, 229, 255, 0.08);
  animation: fadeInUp 0.22s ease both;
}

.s10-checkout-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text-secondary, #94A3B8);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.s10-checkout-modal-close:hover {
  color: var(--color-text-primary, #F5F7FA);
  border-color: rgba(0, 229, 255, 0.32);
}

.s10-checkout-modal-head {
  padding-right: 2.75rem;
  margin-bottom: 1rem;
}

.s10-checkout-modal-kicker {
  display: inline-flex;
  margin-bottom: 0.35rem;
  color: var(--color-neon, #00E5FF);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.s10-checkout-modal-head h3 {
  margin: 0 0 0.25rem;
  color: var(--color-text-primary, #F5F7FA);
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 1.25rem;
}

.s10-checkout-modal-head p,
.s10-checkout-status {
  color: var(--color-text-secondary, #94A3B8);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.s10-checkout-modal-head p { margin: 0; }

.s10-checkout-status {
  margin-bottom: 0.875rem;
  text-align: center;
}

/* ─── Payment methods ──────────────────────────────────────────────────── */

.s10-payment-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}

.s10-payment-method {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon title"
    "icon copy";
  gap: 0.15rem 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--color-text-primary, #F5F7FA);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.s10-payment-method:hover:not(:disabled),
.s10-payment-method:focus-visible {
  border-color: rgba(0, 229, 255, 0.38);
  background: rgba(0, 229, 255, 0.075);
  transform: translateY(-1px);
  outline: none;
}

.s10-payment-method:disabled {
  cursor: wait;
  opacity: 0.68;
}

.s10-payment-visual {
  grid-area: icon;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 229, 255, 0.10);
  color: var(--color-neon, #00E5FF);
  position: relative;
  overflow: hidden;
}

.s10-payment-visual--card {
  background:
    linear-gradient(135deg, rgba(0,229,255,.18), rgba(80,255,180,.10)),
    rgba(255,255,255,.06);
}

.s10-payment-visual--card::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 13px;
  height: 8px;
  border-radius: 999px;
  background: rgba(245,247,250,.82);
}

.s10-payment-visual--card::after {
  content: "";
  position: absolute;
  left: 11px;
  bottom: 11px;
  width: 25px;
  height: 5px;
  border-radius: 999px;
  background: rgba(148,163,184,.85);
}

.s10-payment-visual--pix {
  background:
    radial-gradient(circle at 50% 50%, rgba(0,229,255,.20), transparent 62%),
    rgba(255,255,255,.06);
}

.s10-payment-visual--pix::before,
.s10-payment-visual--pix::after,
.s10-payment-visual--pix span {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid rgba(0,229,255,.92);
  transform: rotate(45deg);
}

.s10-payment-visual--pix::before { left: 14px; top: 15px; }
.s10-payment-visual--pix::after  { right: 14px; top: 15px; }
.s10-payment-visual--pix span    { left: 26px; top: 15px; background: rgba(0,229,255,.18); }

.s10-payment-method strong {
  grid-area: title;
  font-size: var(--text-base);
  line-height: 1.2;
}

.s10-payment-method small {
  grid-area: copy;
  color: var(--color-text-secondary, #94A3B8);
  font-size: var(--text-xs);
  line-height: 1.35;
}

.s10-payment-method.is-loading .s10-payment-visual {
  background: var(--color-neon, #00E5FF);
}

.s10-payment-inline { min-height: 0; }
.s10-payment-inline:not(:empty) { min-height: 360px; }

/* ─── Pix result ───────────────────────────────────────────────────────── */

.s10-pix-result { margin-top: 1rem; }

.s10-pix-card {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1rem;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 14px;
  background: rgba(0, 229, 255, 0.06);
}

.s10-pix-card h3 {
  margin: 0;
  font-family: var(--font-display, 'Sora', sans-serif);
  color: var(--color-text-primary, #F5F7FA);
  font-size: var(--text-lg);
}

.s10-pix-card p {
  margin: 0;
  color: var(--color-text-secondary, #94A3B8);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.s10-pix-qr {
  width: min(220px, 100%);
  aspect-ratio: 1;
  align-self: center;
  padding: 0.75rem;
  border-radius: 12px;
  background: #fff;
}

.s10-pix-code {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--color-text-primary, #F5F7FA);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
}

.s10-pix-empty {
  padding: 0.875rem;
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.22);
}

/* ─── Responsive ───────────────────────────────────────────────────────── */

@media (min-width: 600px) {
  .s10-plans-grid {
    flex-direction: row;
    align-items: stretch;
  }
  .s10-plan-card { flex: 1; }
  .s10-payment-methods { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .s10-checkout-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .s10-checkout-modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    padding: 1rem;
  }
}
