/* ==========================================================================
   Tecla Leve — Checkout + Obrigado (checkout.css)
   Mobile-first: base = celular | 768px = tablet | 1024px = desktop
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Mesma paleta viva da landing */
  --primary:      #1B55FF;   /* botões principais */
  --primary-dark: #1140D6;   /* hover dos botões */
  --blue:         #1B55FF;   /* botão copiar, links, spinner */
  --yellow:       #FFC21A;   /* timer, destaques */
  --green:        #12A150;   /* confirmação, selos */
  --bg:           #FFFFFF;
  --bg-alt:       #EEF2FF;   /* fundo azul bem claro */
  --text:         #0F1730;
  --text-muted:   #5A6480;
  --border:       #D8E0F5;
  --radius:       6px;
  --radius-lg:    10px;
  --shadow:       0 0 0 1px #D8E0F5;
  --shadow-lg:    0 0 0 1px #D8E0F5;

  /* Tokens auxiliares */
  --white:        #FFFFFF;
  --danger:       #E5342B;
  --danger-soft:  rgba(229,52,43,0.07);
  --primary-glow: transparent;
  --blue-dark:    #1140D6;
  --blue-soft:    rgba(27,85,255,0.08);
  --green-soft:   rgba(18,161,80,0.12);
  --yellow-soft:  rgba(255,194,26,0.30);
  --focus-ring:   rgba(27,85,255,0.22);

  --font-title: 'Inter', 'Segoe UI', Arial, sans-serif;
  --font-body:  'Inter', 'Segoe UI', Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-alt);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-title); line-height: 1.25; margin: 0; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
button, input { font: inherit; }
[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   3. Header + progresso
   -------------------------------------------------------------------------- */
.co-header {
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
}
.co-logo {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.co-logo { display: inline-flex; align-items: center; gap: 9px; letter-spacing: -.02em; }
.brand__mark { width: 28px; height: 28px; flex: none; }
.brand__mark .m-bg { fill: var(--primary); }
.brand__mark .m-white { fill: var(--bg); }
.brand__mark .m-black { fill: var(--primary); }
.co-secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-soft);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.progress { padding: 18px 16px 4px; }
.progress ol {
  list-style: none;
  display: flex;
  justify-content: space-between;
  max-width: 520px;
  margin: 0 auto;
  padding: 0;
  counter-reset: none;
}
.progress__step {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}
/* linha entre as etapas */
.progress__step + .progress__step::before {
  content: "";
  position: absolute;
  top: 15px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.progress__step span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  font-family: var(--font-title);
  font-weight: 800;
}
.progress__step.is-active { color: var(--text); }
.progress__step.is-active span { border-color: var(--primary); background: var(--primary); color: var(--white); }
.progress__step.is-done span { border-color: var(--green); background: var(--green); color: var(--white); }
.progress__step.is-active::before,
.progress__step.is-done::before { background: var(--green); }

/* --------------------------------------------------------------------------
   4. Layout (mobile: coluna única — resumo em cima, formulário embaixo)
   -------------------------------------------------------------------------- */
.co-container {
  display: grid;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px 18px;
}
.card__title { font-size: 1.3rem; font-weight: 800; }
.card__title--center, .card__subtitle--center { text-align: center; }
.card__subtitle { margin: 6px 0 18px; color: var(--text-muted); font-size: .92rem; }

/* --------------------------------------------------------------------------
   5. Resumo do pedido
   -------------------------------------------------------------------------- */
.summary .card__title { font-size: 1.05rem; margin-bottom: 14px; }
.summary__product { display: flex; align-items: center; gap: 14px; }
.summary__product img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--blue);
}
.summary__name { font-weight: 700; }
.summary__qty { font-size: .88rem; color: var(--text-muted); }

.summary__lines { margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border); }
.summary__lines div { display: flex; justify-content: space-between; padding: 4px 0; }
.summary__lines dt { color: var(--text-muted); }
.summary__lines dd { margin: 0; font-weight: 600; }
.summary__lines .free { color: var(--green); font-weight: 800; }
.summary__total {
  margin-top: 10px;
  padding-top: 12px !important;
  border-top: 1px solid var(--border);
}
.summary__total dt, .summary__total dd {
  font-family: var(--font-title);
  font-weight: 900 !important;
  font-size: 1.25rem;
  color: var(--text) !important;
}
.summary__total dd { color: var(--text) !important; }

.summary__seals {
  display: none;               /* no mobile os selos ficam compactos abaixo */
  list-style: none;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px dashed var(--border);
  font-size: .85rem;
  color: var(--text-muted);
}
.summary__seals li { display: flex; gap: 10px; padding: 5px 0; }
.summary__seals strong { color: var(--text); }

/* --------------------------------------------------------------------------
   6. Formulário
   -------------------------------------------------------------------------- */
fieldset { border: 0; margin: 0 0 8px; padding: 0; min-width: 0; }
legend {
  width: 100%;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: .95rem;
}

.field { position: relative; margin-bottom: 14px; flex: 1; min-width: 0; }
.field-row { display: flex; gap: 12px; }
.field-row > .field--small { flex: 0 0 34%; }

label {
  display: block;
  margin-bottom: 5px;
  font-size: .88rem;
  font-weight: 600;
}
label em { font-weight: 400; color: var(--text-muted); font-style: normal; }

input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%;
  height: 50px;                 /* toque confortável no celular */
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;              /* 16px evita zoom automático no iOS */
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
input::placeholder { color: var(--text-muted); opacity: .7; }
input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px var(--focus-ring); }
input[readonly] { background: var(--bg-alt); color: var(--text-muted); }

/* Estados de validação */
.field.is-invalid input { border-color: var(--danger); background: var(--danger-soft); }
.field.is-invalid input:focus { box-shadow: 0 0 0 4px var(--danger-soft); }
.field.is-valid input { border-color: var(--green); }
.field__error {
  display: block;
  min-height: 0;
  margin-top: 4px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--danger);
}
.field__error:empty { display: none; }
.field__help { display: inline-block; margin-top: 4px; font-size: .8rem; }

/* Loader do CEP dentro do input */
.input-loader { position: relative; }
.input-loader .spinner { position: absolute; right: 14px; top: 50%; margin-top: -9px; }

/* Alertas */
.alert {
  margin: 4px 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: .9rem;
}
.alert--error { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); }

.form-foot { margin-top: 12px; font-size: .78rem; color: var(--text-muted); text-align: center; }

/* --------------------------------------------------------------------------
   7. Botões
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 14px 20px;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.08rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease, opacity .2s ease;
}
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.btn:disabled { cursor: wait; opacity: .75; }
.btn--cta { background: var(--primary); color: var(--white); box-shadow: 0 6px 20px var(--primary-glow); }
.btn--cta:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); }
.btn--blue { background: var(--blue); color: var(--white); }
.btn--blue:hover { background: var(--blue-dark); }
.btn--success { background: var(--green) !important; }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
  box-shadow: none;
}
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }

.link-btn {
  display: block;
  margin: 18px auto 0;
  padding: 6px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: .88rem;
  text-decoration: underline;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   8. Spinner
   -------------------------------------------------------------------------- */
.spinner {
  display: inline-block;
  flex: none;
  width: 22px;
  height: 22px;
  border: 3px solid var(--blue-soft);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.spinner--sm { width: 18px; height: 18px; border-width: 2px; }
.spinner--btn { border-color: rgba(255,255,255,0.35); border-top-color: var(--white); }

@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   9. Step 2 — Pix
   -------------------------------------------------------------------------- */
.step-panel { animation: fadeUp .45s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.timer {
  width: fit-content;
  margin: 0 auto 16px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--yellow-soft);
  font-size: .95rem;
}
.timer strong { font-family: var(--font-title); font-variant-numeric: tabular-nums; }
.timer.is-ending { background: var(--danger-soft); color: var(--danger); }

.qr {
  display: grid;
  place-items: center;
  width: fit-content;
  margin: 0 auto 18px;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
}
.qr img { width: 240px; height: 240px; border-radius: var(--radius); image-rendering: pixelated; }

.copy { margin-bottom: 16px; }
.copy__row { display: flex; gap: 8px; }
.copy__row input { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.copy__row .btn { width: auto; min-height: 50px; padding: 0 18px; font-size: .95rem; white-space: nowrap; }

.status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--text);
  font-weight: 600;
  font-size: .92rem;
  text-align: center;
}
.status.is-paid { background: var(--green-soft); color: var(--green); }
.status.is-error { background: var(--danger-soft); color: var(--danger); }

.instructions {
  margin: 18px 0 0;
  padding: 16px 16px 16px 36px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  font-size: .9rem;
}
.instructions li { padding: 3px 0; }
.instructions li::marker { color: var(--primary); font-weight: 800; }

.expired { margin: 0 0 16px; padding: 20px; text-align: center; border: 2px dashed var(--danger); border-radius: var(--radius-lg); }
.expired p { margin-bottom: 12px; color: var(--text-muted); font-size: .92rem; }
.expired__icon { display: flex; justify-content: center; margin-bottom: 4px !important; color: var(--danger) !important; }
.expired__icon .ico { width: 44px; height: 44px; }
.expired__title { font-family: var(--font-title); font-weight: 900; font-size: 1.3rem; color: var(--danger) !important; }

.sim-note {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--yellow-soft);
  font-size: .85rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */
.co-footer { padding: 18px 16px 28px; text-align: center; font-size: .78rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   11. Página Obrigado
   -------------------------------------------------------------------------- */
.thanks {
  max-width: 560px;
  margin: 24px auto;
  padding: 0 16px;
}
.thanks .card { padding: 32px 22px; text-align: center; }

.success-icon {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 10px var(--green-soft);
  animation: scaleIn .6s cubic-bezier(.34,1.56,.64,1) both;
}
.success-icon svg { width: 52px; height: 52px; }
.success-icon path {
  fill: none;
  stroke: var(--white);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: draw .5s ease .45s forwards;
}
@keyframes scaleIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.thanks__title { font-size: 1.7rem; font-weight: 900; }
.thanks__subtitle { margin: 8px 0 22px; color: var(--text-muted); font-size: 1.05rem; }
.thanks__subtitle strong { color: var(--text); }

.order-box {
  margin: 0 0 20px;
  padding: 0;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.order-box div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.order-box div + div { border-top: 1px solid var(--border); }
.order-box dt { color: var(--text-muted); font-size: .9rem; }
.order-box dd { margin: 0; font-weight: 700; text-align: right; }
.order-box .paid { color: var(--green); }

.whats-note {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--green-soft);
  text-align: left;
  font-size: .92rem;
}
.whats-note .ico { width: 24px; height: 24px; color: var(--green); }

/* --------------------------------------------------------------------------
   12. Ícones (SVG)
   -------------------------------------------------------------------------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em;
}
.summary__seals .ico { width: 20px; height: 20px; margin-top: 1px; color: var(--text); }
.timer .ico, .form-foot .ico { color: var(--text-muted); }

/* ==========================================================================
   TABLET — 768px
   ========================================================================== */
@media (min-width: 768px) {
  .co-header { padding: 16px 32px; }
  .co-logo { font-size: 1.45rem; }
  .progress__step { flex-direction: row; justify-content: center; gap: 8px; font-size: .88rem; }
  .progress__step + .progress__step::before { display: none; }

  .co-container { padding: 24px 32px; }
  .card { padding: 32px; }
  .card__title { font-size: 1.5rem; }
  .summary__seals { display: block; }
  .qr img { width: 260px; height: 260px; }

  .thanks { margin: 48px auto; }
  .thanks .card { padding: 44px 40px; }
  .thanks__title { font-size: 2.1rem; }
}

/* ==========================================================================
   DESKTOP — 1024px (2 colunas: resumo à esquerda | formulário à direita)
   ========================================================================== */
@media (min-width: 1024px) {
  .co-container {
    grid-template-columns: 340px 1fr;
    align-items: start;
    gap: 24px;
    padding-top: 28px;
  }
  .summary { position: sticky; top: 24px; }
}

/* --------------------------------------------------------------------------
   13. Ajustes da linguagem visual (etiquetas mono, títulos largos)
   -------------------------------------------------------------------------- */
h1, h2, h3, .co-logo, .card__title { letter-spacing: -.015em; }
.btn { font-weight: 600; }
legend, .progress__step, .summary__qty, .form-foot, .co-secure, .timer { font-family: var(--font-body); }
legend { font-size: .74rem; font-weight: 500; text-transform: uppercase; color: var(--text-muted); border-bottom-color: var(--text); }
.progress__step { font-size: .68rem; text-transform: uppercase; }
.progress__step span { border-radius: var(--radius); font-family: var(--font-body); font-weight: 600; }
.co-secure { border-radius: 3px; font-size: .68rem; text-transform: uppercase; }
.card { box-shadow: 0 0 0 1px var(--border); }
input[type="text"], input[type="email"], input[type="tel"] { border-radius: var(--radius); border-width: 1px; }
input:focus { border-color: var(--text); }
.qr { border-radius: var(--radius-lg); border-width: 1px; }
.timer { border-radius: 3px; font-size: .82rem; }
.status { border-radius: var(--radius); }
.success-icon { box-shadow: none; }

.pix-marca { display: flex; justify-content: center; margin-bottom: 8px; }
.pix-logo--grande { width: 34px; height: 34px; }

/* Números alinhados onde a fonte monoespaçada era usada */
.btn__price, .flag--timer, .learn__count, .gallery__count, .offer__meta,
.price__save, .unroll__meter, .step__num, .reel figcaption span,
.timer, .progress__step span, .copy__row input { font-variant-numeric: tabular-nums; }

/* Números do checkout em Inter */
.summary__total dt, .summary__total dd, .progress__step span {
  font-family: var(--font-body) !important;
  font-weight: 800 !important;
  letter-spacing: -.02em;
}
