/* Passo de compra DENTRO do cartão (desktop) / da aba de baixo (celular): resumo, Pix ou cartão, nome, WhatsApp, e-mail e termos.
   Arquivo separado de propósito (como video.css, demo.css e entrar.css): abrir/fechar a aba, as abas e a cena 3D continuam em
   landing.css / landing.js. Só liga com JavaScript (js/compra.js põe a classe .is-buying no cartão); sem ele nada disto aparece
   e o botão continua levando ao checkout da plataforma. */

/* fora do passo de compra: escondido */
.su-buybar, .su-buy, .su-pay, .su-buy-trust { display: none; }

/* passo de compra com a aba aberta: sai a vitrine (selo, título, abas, preço fixo, botão antigo), entra o formulário.
   Com a aba recolhida (celular) ou minimizada (desktop), o cartão volta a ser exatamente o de sempre. */
.signup.is-buying[data-open="true"] .su-toprow,
.signup.is-buying[data-open="true"] .su-title,
.signup.is-buying[data-open="true"] .su-tabs,
.signup.is-buying[data-open="true"] .su-peek,
.signup.is-buying[data-open="true"] #su-cta,
.signup.is-buying[data-open="true"] .su-micro,
.signup.is-buying[data-open="true"] .su-clip > .su-panel:not(.su-buy) { display: none !important; }
.signup.is-buying[data-open="true"] .su-buybar { display: flex; }
.signup.is-buying[data-open="true"] .su-buy { display: block; }
.signup.is-buying[data-open="true"] .su-pay { display: flex; }
.signup.is-buying[data-open="true"] .su-buy-trust { display: flex; }

/* topo do passo: "Voltar" discreto + selo de pagamento seguro (o botão de minimizar continua no canto) */
.su-buybar { align-items: center; gap: 8px; min-height: 44px; padding-right: 52px; }
.su-back {
  flex: none; display: inline-flex; align-items: center; gap: 3px; height: 44px; margin-left: -8px; padding: 0 12px 0 6px; border: 0; border-radius: 12px;
  cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; color: #c9c3ef; background: transparent; -webkit-tap-highlight-color: transparent;
  transition: color 0.2s, background 0.2s;
}
.su-back:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.su-back svg { flex: none; }
.su-secure { margin: 0 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.2; font-weight: 680; color: #bfe9d3; white-space: nowrap; }
.su-secure svg { flex: none; color: var(--green); }

/* conteúdo do passo */
.su-buy { padding-top: 10px; }
.su-buy-h { margin: 0; font-size: 21px; line-height: 1.15; font-weight: 830; letter-spacing: -0.02em; color: #fff; }
.su-buy-h:focus, .su-buy-h:focus-visible { outline: none; }          /* só recebe foco por código (tabindex=-1), para o leitor de tela começar daqui */
.su-buy .su-kick { margin-bottom: 4px; }

/* aviso de erro que volta da plataforma (?checkout_erro=) */
.su-buy-alert {
  display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 0; padding: 11px 13px; border-radius: 13px;
  font-size: 13.5px; line-height: 1.45; color: #ffe4da; background: rgba(255, 106, 77, 0.12); border: 1px solid rgba(255, 138, 110, 0.5);
}
.su-buy-alert svg { flex: none; margin-top: 1px; color: #ff9b85; }
.su-buy-alert p { margin: 0; }
.su-buy-alert a, .su-buy-alert button { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.su-buy-alert button { display: inline; margin: -12px 0; padding: 12px 0; border: 0; background: none; cursor: pointer; font: inherit; }

/* resumo do pedido */
.su-sum {
  margin-top: 14px; padding: 12px 14px 12px; border-radius: 16px;
  background: linear-gradient(160deg, rgba(124, 92, 255, 0.18), rgba(124, 92, 255, 0.05) 55%, rgba(255, 181, 71, 0.07));
  border: 1px solid rgba(185, 173, 255, 0.26);
}
.su-sum-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.su-sum-l li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13.5px; line-height: 1.35; color: #d6d6e4; }
.su-sum-l li > span { min-width: 0; }
.su-sum-l li > b { flex: none; font-weight: 760; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.su-sum-l .is-main > span { font-weight: 760; color: #fff; }
.su-sum-l small { display: block; margin-top: 1px; font-size: 12px; line-height: 1.35; font-weight: 600; color: #b8b0f0; }
.su-sum-l .is-bump > span { color: #e8e2c9; }
.su-sum-tot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed rgba(185, 173, 255, 0.32); }
.su-sum-tot > span { display: flex; flex-direction: column; min-width: 0; }
.su-sum-tot > span b { font-size: 11px; line-height: 1.3; font-weight: 780; letter-spacing: 0.13em; text-transform: uppercase; color: #c3c3d6; }
.su-sum-tot small { margin-top: 2px; font-size: 12px; line-height: 1.3; font-weight: 620; color: #b8b0f0; }
.su-sum-tot strong { flex: none; font-size: 28px; line-height: 1; font-weight: 860; letter-spacing: -0.035em; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Pix x Cartão: dois blocos grandes */
.su-paybox { min-width: 0; margin: 16px 0 0; padding: 0; border: 0; }
.su-label { display: block; margin: 0 0 7px; padding: 0; font-size: 13px; line-height: 1.3; font-weight: 740; color: #ececf4; }
.su-payopts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.su-payopts.is-single { grid-template-columns: 1fr; }
.su-payopts.has-tag { padding-top: 7px; }                          /* espaço para o selo "Economize" não encostar na pergunta */
.su-po {
  position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 82px; padding: 10px 12px 10px; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 1.5px solid rgba(255, 255, 255, 0.16); -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none; transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.su-po:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.26); }
.su-po input { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.su-po-top { display: flex; align-items: center; gap: 7px; font-size: 15px; line-height: 1.2; font-weight: 820; color: #fff; }
.su-po-top svg { flex: none; }
.su-po-pix .su-po-top svg { color: #2de2c5; }
.su-po-card .su-po-top svg { color: var(--brand-soft); }
.su-po-dot { flex: none; width: 18px; height: 18px; margin-left: auto; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.38); display: grid; place-items: center; transition: border-color 0.2s; }
.su-po-price { margin-top: 7px; font-size: 17px; line-height: 1.15; font-weight: 830; letter-spacing: -0.01em; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.su-po-sub { margin-top: 2px; font-size: 12px; line-height: 1.3; font-weight: 620; color: #b9b9cd; }
.su-po-tag {
  position: absolute; top: -9px; right: 9px; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  font-size: 10.5px; line-height: 1.35; font-weight: 850; letter-spacing: 0.02em; color: #1d1206; background: var(--gold);
}
.su-po:has(input:checked) { background: rgba(255, 181, 71, 0.1); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 181, 71, 0.14); }
.su-po:has(input:checked) .su-po-dot { border-color: var(--accent); }
.su-po:has(input:checked) .su-po-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.su-po:has(input:checked) .su-po-sub { color: #f1e3c8; }
.su-po:has(input:focus-visible) { outline: 3px solid #fff; outline-offset: 2px; }

/* campos */
.su-fields { display: grid; gap: 11px; margin-top: 16px; }
.su-field { min-width: 0; }
.su-field label { display: block; margin: 0 0 5px; font-size: 13px; line-height: 1.3; font-weight: 720; color: #ececf4; }
.su-field input {
  display: block; width: 100%; height: 48px; margin: 0; padding: 0 14px; border-radius: 13px; outline: none;
  font: inherit; font-size: 16px; line-height: 1.2; color: #fff; caret-color: var(--accent);       /* 16 px: o iPhone não dá zoom ao tocar */
  background: rgba(6, 6, 12, 0.6); border: 1.5px solid rgba(185, 173, 255, 0.28); transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none; appearance: none;
}
.su-field input::placeholder { color: #8a8aa3; opacity: 1; }
.su-field input:hover { border-color: rgba(185, 173, 255, 0.46); }
.su-field input:focus { border-color: var(--accent); background: rgba(6, 6, 12, 0.78); box-shadow: 0 0 0 3px rgba(255, 181, 71, 0.22); }
.su-field input[aria-invalid="true"] { border-color: #ff8a73; box-shadow: 0 0 0 3px rgba(255, 120, 90, 0.16); }
.su-field input:-webkit-autofill, .su-field input:-webkit-autofill:hover, .su-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff; caret-color: #fff; -webkit-box-shadow: 0 0 0 40px #15122a inset; transition: background-color 9999s 0s;
}
.su-hint, .su-err, .su-sug { margin: 5px 0 0; font-size: 12.5px; line-height: 1.35; }
.su-hint { color: #a9a9c0; }
.su-err { display: flex; align-items: flex-start; gap: 5px; font-weight: 650; color: #ffad9b; }
.su-err::before {
  content: "!"; flex: none; width: 15px; height: 15px; margin-top: 1px; border-radius: 50%; text-align: center;
  font-size: 11px; line-height: 15px; font-weight: 900; color: #1f0b05; background: #ff8a73;
}
.su-field.is-bad .su-hint { display: none; }
.su-sug { color: #d6ceff; }
.su-sug button {
  display: inline; margin: -13px 0; padding: 13px 0; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 750; color: var(--accent-soft);
  text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere;
}

/* termos em uma linha */
.su-terms { display: flex; align-items: center; gap: 11px; min-height: 44px; margin-top: 10px; cursor: pointer; font-size: 13.5px; line-height: 1.35; color: #dcdce8; -webkit-tap-highlight-color: transparent; }
.su-terms input {
  appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border-radius: 7px; cursor: pointer;
  border: 2px solid var(--accent); background: rgba(9, 9, 15, 0.5); display: grid; place-items: center; transition: background 0.15s, border-color 0.15s;
}
.su-terms input:checked { background: var(--accent); }
.su-terms input:checked::after { content: ""; width: 11px; height: 6px; border: solid #1f1303; border-width: 0 0 3px 3px; transform: translateY(-1px) rotate(-45deg); }
.su-terms input[aria-invalid="true"] { border-color: #ff8a73; box-shadow: 0 0 0 3px rgba(255, 120, 90, 0.2); }
.su-terms input:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.su-terms a { color: var(--brand-soft); font-weight: 650; text-underline-offset: 3px; }
.su-terms a:hover { color: #fff; }
.su-terms + .su-err { margin-top: 0; }

/* armadilha para robô: fora da tela, fora do Tab, nunca preenchida por gente */
.su-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* botão de pagar: o mesmo dourado do botão principal (classe .su-cta), agora um <button> de enviar */
.su-pay { width: 100%; border: 0; margin: 0; cursor: pointer; font: inherit; text-align: left; -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent; }
.su-pay-l { font-size: 18.5px; line-height: 1.15; font-weight: 830; letter-spacing: -0.012em; }
.su-pay small { display: block; }
.su-pay.is-sending { cursor: progress; filter: saturate(0.85); }
.su-pay.is-sending .su-cta-ic svg { display: none; }
.su-pay.is-sending .su-cta-ic::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 207, 115, 0.3); border-top-color: #ffcf73; animation: su-spin 0.8s linear infinite; }
@keyframes su-spin { to { transform: rotate(360deg); } }
.su-buy-trust { flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin: 9px 0 0; font-size: 12px; line-height: 1.4; color: #a9a9be; }
.su-buy-trust span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.su-buy-trust svg { flex: none; color: var(--green); }

/* desktop com pouca altura (notebook 1366x768, 1280x800): tudo um pouco mais junto, para caber sem rolar */
@media (min-width: 761px) and (min-height: 481px) and (max-height: 820px) {
  .su-buy { padding-top: 6px; }
  .su-buy .su-kick { display: none; }
  .su-buy-h { font-size: 19px; }
  .su-sum { margin-top: 10px; padding: 10px 13px; }
  .su-sum-l { gap: 5px; }
  .su-sum-tot { margin-top: 8px; padding-top: 8px; }
  .su-sum-tot strong { font-size: 25px; }
  .su-paybox { margin-top: 12px; }
  .su-po { min-height: 74px; padding: 9px 11px; }
  .su-po-price { margin-top: 5px; font-size: 16px; }
  .su-fields { gap: 9px; margin-top: 12px; }
  .su-field input { height: 44px; }
  .su-hint { margin-top: 3px; font-size: 12px; }
  .su-terms { margin-top: 6px; }
  .su-pay-l { font-size: 17px; }
}

/* celular / tela vertical (a aba de baixo) */
@media (max-width: 760px), (max-height: 480px), (max-aspect-ratio: 5/6) {
  .su-buybar { padding-right: 54px; }
  .su-buy { padding-top: 8px; min-height: 0; }
  .su-buy .su-kick { display: none; }                               /* celular: o "Voltar" e o título já dizem onde a pessoa está */
  .su-buy-h { font-size: 20px; }
  .su-sum { margin-top: 12px; }
  /* teclado aberto (js/compra.js mede a área visível): a aba fica logo acima do teclado, com o botão de pagar à vista */
  .signup.is-buying.has-kb[data-open="true"] { bottom: var(--kb, 0px); max-height: calc(var(--vvh, 100dvh) - 6px); transition: none; }
  .signup.is-buying.has-kb[data-open="true"] .su-buy-trust { display: none; }
  .signup.is-buying.has-kb[data-open="true"] .su-foot { padding-top: 8px; }
}
@media (max-width: 380px) {
  .su-secure { font-size: 11.5px; }
  .su-po { padding: 10px 10px; }
  .su-po-top { font-size: 14.5px; gap: 6px; }
  .su-po-price { font-size: 16px; }
  .su-pay-l { font-size: 17.5px; }
  .su-buy-trust { gap: 4px 10px; font-size: 11.5px; }
}
/* celular deitado: o botão de pagar fica na coluna da direita (mesmo lugar do botão principal). No passo de compra o formulário
   ocupa só a coluna da esquerda e a coluna do botão acompanha a rolagem: preencher nome, WhatsApp e e-mail não esconde o "Pagar". */
@media (max-height: 480px) and (min-aspect-ratio: 6/5) {
  .su-pay-l { font-size: 16px; }
  .su-buy-trust { margin-top: 6px; font-size: 11px; }
  .signup.is-buying[data-open="true"] .su-collapsible { grid-column: 1; grid-row: 2 / 4; }
  .signup.is-buying[data-open="true"] .su-actions { grid-row: 1 / 4; align-self: start; position: sticky; top: 0; z-index: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .su-pay.is-sending .su-cta-ic::after { animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
}
