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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.page-checkout {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  color: var(--desktop-ink); background: #f6f5ef;
  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-layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 44px; align-items: start; padding: 36px 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: 6px; margin-bottom: 18px; color: #6b6455; font-size: 14px; font-weight: 600; 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: #6b6455; font-size: 16px; }
.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: #6b6455; font-size: 14px; line-height: 1.5; }
.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 #d6cebc; border-radius: 12px; overflow: hidden; }
.co-quantity button { width: 44px; height: 48px; border: 0; background: #fff6d6; color: #715300; font: 700 22px/1 "DM Sans", sans-serif; cursor: pointer; }
.co-quantity button:hover:not(:disabled) { background: #ffe58a; }
.co-quantity button:disabled { color: #6b6455; background: #f5f2eb; 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-receipt__devices { margin: 9px 0 0; font: 600 13px/1.5 "DM Sans", sans-serif; color: #6b6455; text-align: center; }
.co-retry { margin: 0 0 20px; min-height: 44px; }
.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: #5c4300; background: #fff6d6; border-color: #ffe58a; }

/* ---------------------------------------------------------------- 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(26, 24, 19, .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: #fff6d6; 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: #6b6455; font-size: 14px; }
.co-step__edit { margin-left: auto; padding: 6px 10px; border: 0; border-radius: 8px; background: #f3f1e9; 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: #3d382d; }
.co-optional { font-weight: 600; color: #a59d8b; }
.co-field input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid #d8d2c4; background: #fdfcf8;
  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: #6e685a; }
.co-field input:focus { outline: none; background: #fff; border-color: var(--desktop-accent); box-shadow: 0 0 0 4px rgba(255, 184, 0, .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: #3d382d; 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: #faf9f4; color: #6b6455; font-size: 14.5px; }
.co-fineprint { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 2px 0 0; color: #6e685a; 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 #d8d2c4; 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(26, 24, 19, .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: #3d382d; 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 #d8d2c4; background: #faf9f4; color: #3d382d; 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: #3d3112; }
.co-copy__btn:focus-visible { outline: 3px solid #ffc400; outline-offset: 2px; }
.co-copy__btn.is-copied { background: #047857; }
.co-waiting { display: flex; align-items: center; gap: 9px; margin: 16px 0 8px; color: #3d382d; 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: #6b6455; }

.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: #6b6455; }
.co-key { padding: 16px; border-radius: 14px; border: 2px dashed #f2cf63; background: #fffcf0; }
.co-key > span { display: block; margin-bottom: 8px; color: #3d382d; 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: #6e685a; font-size: 13px; }
.co-next { display: grid; gap: 10px; margin: 6px 0 0; padding-left: 20px; color: #3d382d; 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: #3d382d; font-size: 14.5px; line-height: 1.5; }
.co-quote figcaption { display: flex; align-items: center; gap: 10px; color: #6e685a; 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: #fff1c2; 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-receipt { box-shadow: 0 24px 50px -22px rgba(26, 24, 19, .5); }
.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: #5a5446; 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: #6e685a; font-size: 13.5px; }

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

/* ------------------------------------------------------------ responsivo */
@media (max-width: 960px) {
  .co-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 22px; }
  .co-aside { position: static; order: -1; }
  .co-perks, .co-help { display: none; }
  /* 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; }
}

@media (max-width: 640px) {
  .co-license { grid-template-columns: 1fr; padding: 18px 16px; }
  .co-quantity { justify-self: start; }
  .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-result, .co-success__badge { animation: none; }
  .co-spinner, .co-waiting__dot { animation-duration: 2.4s; }
}
