/* ==========================================================================
   Checkout do Lummi Desktop · herda o mundo da página de venda (desktop.css)
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@property --co-border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
body.page-checkout {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  color: var(--desktop-ink); background: #f3f6fa;
  font: 16px/1.5 "DM Sans", system-ui, sans-serif;
}
.shell { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
[hidden] { display: none !important; }
a { color: var(--desktop-accent); }

/* ---------------------------------------------------------------- topo */
.co-header { background: var(--desktop-deep); color: #fff; }
.co-header__row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.co-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 800 17px/1 "Manrope", sans-serif; }
.co-secure { display: inline-flex; align-items: center; gap: 7px; color: #a7f3d0; font-size: 14px; font-weight: 600; }
.co-secure i { width: 16px; height: 16px; }

/* --------------------------------------------------------------- layout */
.co-topbar { padding-block: 16px 20px; }
.co-layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 44px; align-items: start; padding: 0 0 64px; }
/* Sem isto a chave e o código Pix (campos sem quebra) alargam a coluna além da tela no celular. */
.co-main, .co-aside { min-width: 0; }
.co-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #1d4ed8; font-size: 14px; font-weight: 700; text-decoration: none; }
.co-back i { width: 16px; height: 16px; }
.co-back:hover { color: var(--desktop-accent); }
.co-main h1 { margin: 0 0 10px; font: 800 clamp(27px, 3.2vw, 38px)/1.1 "Manrope", sans-serif; letter-spacing: -.03em; text-wrap: balance; }
.co-lead { margin: 0 0 26px; max-width: 38em; color: #5b6b82; font-size: 16px; }
.co-confidence { position: relative; z-index: 1; display: grid; gap: 12px; padding: 18px 22px; margin: 0; list-style: none; background: #eff6ff; color: #1e3a8a; font: 600 14px/1.4 "DM Sans", sans-serif; }
.co-confidence li { display: inline-flex; align-items: center; gap: 7px; }
.co-confidence svg { flex: 0 0 auto; width: 19px; height: 19px; color: #1d4ed8; }
.co-license { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; margin-bottom: 22px; padding: 20px; background: #fff; border: 1px solid var(--desktop-border); border-radius: 16px; }
.co-license h2 { margin: 0 0 7px; font: 800 17px/1.35 "Manrope", sans-serif; }
.co-license p { margin: 0; color: var(--desktop-muted); font-size: 14px; }
.co-license .co-license__detail { grid-column: 1 / -1; color: var(--desktop-ink); font-weight: 700; }
.co-license .co-license__note { grid-column: 1 / -1; font-size: 13px; }
.co-quantity { display: flex; align-items: center; align-self: start; border: 1px solid #cbd5e1; border-radius: 12px; overflow: hidden; }
.co-quantity button { width: 44px; height: 48px; border: 0; background: #eff6ff; color: #1d4ed8; font: 700 22px/1 "DM Sans", sans-serif; cursor: pointer; }
.co-quantity button:hover:not(:disabled) { background: #dbeafe; }
.co-quantity button:disabled { color: #64748b; background: #f1f5f9; cursor: default; }
.co-quantity input { width: 49px; height: 48px; padding: 0; border: 0; background: #fff; text-align: center; font: 700 17px/1 "DM Sans", sans-serif; color: var(--desktop-ink); appearance: textfield; -moz-appearance: textfield; }
.co-quantity input::-webkit-inner-spin-button, .co-quantity input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.co-retry { margin: 0 0 20px; min-height: 44px; }
.co-field-help, .co-step-assure { margin: 0; color: var(--desktop-muted); font-size: 13px; line-height: 1.5; }
.co-step-assure { margin-top: 4px; text-align: center; }
.co-payment-help { grid-column: 1 / -1; margin: 0; font-size: 14px; color: #334155; }
.co-receipt__devices { margin: 9px 0 0; font: 600 13px/1.5 "DM Sans", sans-serif; text-align: center; color: #334155; }
.co-success__devices { color: #047857; font-weight: 700; }
.co-protection, .co-recent { padding: 20px; background: #fff; border: 1px solid var(--desktop-border); border-radius: 16px; }
.co-protection h2, .co-recent h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font: 800 16px/1.4 "Manrope", sans-serif; }
.co-protection h2 svg { width: 21px; height: 21px; color: #047857; flex-shrink: 0; }
.co-protection p, .co-recent p { font-size: 14px; line-height: 1.6; color: var(--desktop-muted); margin: 0 0 12px; }
.co-protection a { overflow-wrap: anywhere; font-size: 14px; text-underline-offset: 3px; }
.co-recent ul { padding: 0; margin: 0 0 12px; list-style: none; display: grid; gap: 12px; }
.co-recent li { display: grid; gap: 3px; font-size: 14px; }
.co-recent li span { color: var(--desktop-muted); }
.co-recent p { margin: 0; font-size: 12px; }
.co-conditions { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--desktop-border); color: var(--desktop-muted); font-size: 14px; line-height: 1.65; }
.co-conditions summary { min-height: 44px; cursor: pointer; color: var(--desktop-ink); font-weight: 700; }
.co-conditions p { margin: 0 0 12px; }
.button:disabled { opacity: .65; cursor: wait; transform: none; box-shadow: none; }

.co-alert { margin-bottom: 18px; padding: 14px 16px; border-radius: 12px; font-size: 14.5px; line-height: 1.5; color: #7f1d1d; background: #fef2f2; border: 1px solid #fecaca; }
.co-alert.is-info { color: #1e3a8a; background: #eff6ff; border-color: #bfdbfe; }

/* ---------------------------------------------------------------- passos */
.co-step { margin-bottom: 16px; padding: 22px 24px; border-radius: 18px; background: #fff; border: 1px solid var(--desktop-border); box-shadow: 0 10px 24px -18px rgba(15, 23, 42, .35); transition: opacity .3s ease; }
.co-step.is-locked { opacity: .55; }
.co-step.is-locked .co-step__body { display: none; }
.co-step__head { display: flex; align-items: flex-start; gap: 14px; }
.co-step__num { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; background: #eff6ff; color: var(--desktop-accent); font: 800 15px/1 "Manrope", sans-serif; }
.co-step.is-done .co-step__num { background: #dcfce7; color: #047857; }
.co-step__head h2 { margin: 3px 0 2px; font: 800 18px/1.2 "Manrope", sans-serif; }
.co-step__head p { margin: 0; color: #5b6b82; font-size: 14px; }
.co-step__edit { margin-left: auto; padding: 6px 10px; border: 0; border-radius: 8px; background: #f1f5f9; color: var(--desktop-accent); font: 700 13px/1 "Manrope", sans-serif; cursor: pointer; }
.co-step__body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 20px; }

.co-field { display: grid; gap: 6px; align-content: start; }
.co-field--full, .co-field--action { grid-column: 1 / -1; }
.co-field label { font: 700 13.5px/1.2 "Manrope", sans-serif; color: #334155; }
.co-optional { font-weight: 600; color: #64748b; }
.co-field input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid #cbd5e1; background: #fbfcfe;
  color: var(--desktop-ink); font: 500 16px/1 "DM Sans", sans-serif; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.co-mailto strong { color: var(--desktop-ink); overflow-wrap: anywhere; }
.co-resend { display: inline-flex; align-items: center; gap: 6px; margin-top: -4px; }
.co-resend svg { width: 15px; height: 15px; }
.co-resend[disabled] { opacity: .6; cursor: default; }
.co-field input::placeholder { color: #64748b; }
.co-field input:focus { outline: none; background: #fff; border-color: var(--desktop-accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
.co-field input[aria-invalid="true"] { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .1); }
.co-error { min-height: 0; color: #b91c1c; font-size: 12.5px; font-weight: 600; }
.co-error:empty { display: none; }
.co-continue { width: 100%; margin-top: 4px; }
.co-continue i { width: 18px; height: 18px; }
.co-summary { margin: 14px 0 0 46px; color: #334155; font-size: 14.5px; }

.co-brick { min-height: 60px; grid-column: 1 / -1; }
.co-brick-loading { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 18px; border-radius: 12px; background: #f8fafc; color: #5b6b82; font-size: 14.5px; }
.co-fineprint { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 2px 0 0; color: #64748b; font-size: 12.5px; }
.co-fineprint i { flex: 0 0 auto; width: 15px; height: 15px; color: var(--desktop-emerald); }

.co-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #cbd5e1; border-top-color: var(--desktop-accent); animation: co-spin .8s linear infinite; }
.co-spinner--big { width: 40px; height: 40px; border-width: 4px; }
@keyframes co-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ resultados */
.co-result { padding: 28px; border-radius: 20px; background: #fff; border: 1px solid var(--desktop-border); box-shadow: 0 14px 30px -20px rgba(15, 23, 42, .4); animation: co-rise .5s var(--ease-out) both; }
@keyframes co-rise { from { opacity: 0; transform: translateY(10px); } }
.co-result h2 { margin: 0 0 10px; font: 800 24px/1.2 "Manrope", sans-serif; letter-spacing: -.02em; }

.co-pix { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.co-pix__qr { display: grid; place-items: center; width: 240px; height: 240px; padding: 10px; border-radius: 16px; background: #fff; border: 2px solid var(--desktop-deep); }
.co-pix__qr img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.co-pix__steps { margin: 0 0 16px; padding-left: 20px; color: #334155; font-size: 14.5px; }
.co-pix__steps li { margin-bottom: 6px; }
.co-copy { display: flex; gap: 8px; }
.co-copy input { flex: 1; min-width: 0; height: 46px; padding: 0 12px; border-radius: 11px; border: 1px solid #cbd5e1; background: #f8fafc; color: #334155; font: 500 13px/1 "JetBrains Mono", Consolas, monospace; }
.co-copy__btn { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; height: 46px; padding: 0 16px; border: 0; border-radius: 11px; cursor: pointer; color: #fff; background: var(--desktop-deep); font: 800 14px/1 "Manrope", sans-serif; transition: background .15s ease; }
.co-copy__btn i { width: 16px; height: 16px; }
.co-copy__btn:hover { background: #173868; }
.co-copy__btn.is-copied { background: #047857; }
.co-waiting { display: flex; align-items: center; gap: 9px; margin: 16px 0 8px; color: #334155; font-size: 14.5px; }
.co-waiting strong { font-variant-numeric: tabular-nums; }
.co-waiting__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--desktop-amber); animation: co-pulse 1.6s ease-in-out infinite; }
@keyframes co-pulse { 50% { box-shadow: 0 0 0 7px rgba(245, 158, 11, .18); } }
.co-linkbtn { padding: 0; border: 0; background: none; color: var(--desktop-accent); font: 700 14px/1.4 "Manrope", sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.co-state { display: grid; justify-items: center; gap: 10px; padding: 18px 8px; text-align: center; }
.co-state p { max-width: 32em; margin: 0; color: #5b6b82; }

.co-success { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.co-success__badge { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; background: var(--desktop-emerald); animation: co-pop .6s var(--ease-out) both; }
.co-success__badge i { width: 28px; height: 28px; stroke-width: 3; }
@keyframes co-pop { from { transform: scale(.4); opacity: 0; } }
.co-success > p { margin: 0; color: #5b6b82; }
.co-key { padding: 16px; border-radius: 14px; border: 2px dashed #93c5fd; background: #f8fbff; }
.co-key > span { display: block; margin-bottom: 8px; color: #334155; font: 700 13px/1 "Manrope", sans-serif; }
.co-copy--key input { height: 52px; font-size: 17px; font-weight: 700; color: var(--desktop-ink); background: #fff; letter-spacing: .03em; }
.co-download { margin-top: 4px; }
.co-download__meta { margin: -6px 0 0; text-align: center; color: #64748b; font-size: 13px; }
.co-next { display: grid; gap: 10px; margin: 6px 0 0; padding-left: 20px; color: #334155; font-size: 14.5px; }

/* ---------------------------------------------------------- depoimentos */
.co-quotes { display: grid; gap: 14px; margin-top: 8px; }
.co-quotes h2 { margin: 0; font-family: Manrope, sans-serif; font-size: 17px; color: var(--desktop-ink); }
.co-quotes__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.co-quote { display: grid; gap: 10px; align-content: start; margin: 0; padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--desktop-border); }
.co-quote blockquote { margin: 0; color: #334155; font-size: 14.5px; line-height: 1.5; }
.co-quote figcaption { display: flex; align-items: center; gap: 10px; color: #64748b; font-size: 13px; line-height: 1.4; }
.co-quote__avatar { flex: 0 0 44px; display: grid; place-items: center; width: 44px; height: 44px; overflow: hidden; border-radius: 50%; background: #e0ecff; color: var(--desktop-accent); font-family: Manrope, sans-serif; font-size: 15px; font-weight: 800; }
.co-quote__avatar img { width: 100%; height: 100%; object-fit: cover; }
.co-quote figcaption strong { display: block; color: var(--desktop-ink); font-size: 13.5px; }

/* ------------------------------------------------------------- lateral */
.co-aside { position: sticky; top: 24px; display: grid; gap: 18px; }
.co-offer { position: relative; isolation: isolate; min-width: 0; overflow: hidden; padding: 3px; border-radius: 18px; background: #2563eb; box-shadow: 0 18px 42px -28px rgba(29, 78, 216, .6); }
.co-offer::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: conic-gradient(from var(--co-border-angle), #2563eb 0deg, #2563eb 100deg, #6c4df6 170deg, #38bdf8 220deg, #2563eb 290deg, #2563eb 360deg); animation: co-border-orbit 7s linear infinite; }
.co-receipt { position: relative; z-index: 1; box-shadow: none; }
.co-receipt .dk-receipt__total { color: #1d4ed8; }
@keyframes co-border-orbit { to { --co-border-angle: 360deg; } }
.co-perks { display: grid; gap: 12px; margin: 0; padding: 18px; list-style: none; border-radius: 16px; background: #fff; border: 1px solid var(--desktop-border); }
.co-perks li { display: flex; align-items: flex-start; gap: 10px; color: #475569; font-size: 14px; line-height: 1.45; }
.co-perks i { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; color: var(--desktop-accent); }
.co-perks strong { color: var(--desktop-ink); }
.co-help { margin: 0; text-align: center; color: #64748b; font-size: 13.5px; }

/* --------------------------------------------------------------- rodapé */
.co-footer { padding: 20px 0; background: #fff; border-top: 1px solid var(--desktop-border); color: #64748b; font-size: 13px; }
.co-footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.co-footer a { color: #475569; }

/* ------------------------------------------------------------ responsivo */
@media (max-width: 960px) {
  .co-topbar { padding-block: 8px 12px; }
  .co-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .co-aside { display: contents; position: static; }
  .co-offer { order: -1; }
  .co-perks { display: none; }
  .co-help, .co-protection { order: 1; }
  .co-recent { order: 2; }
  /* No celular o cupom vira só o total, no topo. */
  .co-receipt .dk-receipt__lines, .co-receipt .dk-receipt__barcode, .co-receipt .dk-receipt__note { display: none; }
  .co-receipt { padding: 18px 20px 16px; }
  .co-receipt .dk-receipt__head { padding-bottom: 10px; margin-bottom: 0; border: 0; text-align: left; }
  .co-receipt .dk-receipt__total { margin-top: 0; }
  .co-confidence { grid-template-columns: 1fr 1fr; gap: 12px 10px; padding: 15px 18px; }
  .co-confidence li:last-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .co-license { grid-template-columns: 1fr; padding: 18px 16px; }
  .co-quantity { justify-self: start; }
  .co-secure { max-width: 145px; font-size: 12px; }
  .co-confidence { gap: 10px 16px; font-size: 13px; }
  .co-step { padding: 18px 16px; }
  .co-step__body { grid-template-columns: 1fr; }
  .co-summary { margin-left: 0; }
  .co-result { padding: 20px 16px; }
  .co-pix { grid-template-columns: 1fr; justify-items: center; }
  .co-pix__info { width: 100%; }
  /* A chave inteira à vista: o botão desce para baixo do campo. */
  .co-copy--key { flex-direction: column; }
  .co-copy--key input { font-size: 15px; text-align: center; }
  .co-copy--key .co-copy__btn { justify-content: center; }
  .co-secure { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .co-offer::before { animation: none; }
  .co-result, .co-success__badge { animation: none; }
  .co-spinner, .co-waiting__dot { animation-duration: 2.4s; }
}
