/* Tali · checkout da assinatura (assinatura.html): stepper de 3 passos + resumo do pedido. */

/* Topo enxuto: logo, voltar e selo de pagamento seguro */
.co-nav { position: relative; z-index: 5; padding: 18px 0; }
.co-nav__inner { display: flex; align-items: center; gap: 20px; }
.co-back { margin-right: auto; color: var(--purple-900); font-weight: 700; font-size: 15px; text-decoration: none; padding: 8px 14px; border-radius: var(--r-pill); transition: background .2s; }
.co-back:hover { background: rgba(255, 255, 255, .7); }
.co-secure { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--mint-ink); background: rgba(255, 255, 255, .75); border: 1px solid rgba(99, 215, 176, .45); padding: 8px 14px; border-radius: var(--r-pill); }
.co-secure svg { width: 16px; height: 16px; fill: currentColor; }
@media (max-width: 640px) { .co-secure { display: none; } .co-back { margin-right: 0; margin-left: auto; } }

/* Grade */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; padding-top: 16px; padding-bottom: 96px; }
.co-intro { margin-bottom: 24px; }
.co-title { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; color: var(--purple-900); }
.co-lead { margin: 8px 0 0; font-size: 17px; line-height: 25px; color: var(--muted); font-weight: 600; }

/* Stepper: bolinhas ligadas por uma linha que fica roxa quando o passo termina */
.stepper { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.stepper__item { display: flex; align-items: center; min-width: 0; }
.stepper__item:not(:last-child)::after {
  content: ""; flex: 1; min-width: 16px; height: 3px; margin-right: 12px; border-radius: 3px;
  background: var(--lilac-200); transition: background .4s;
}
.stepper__item.is-done:not(:last-child)::after { background: var(--purple-500); }
.stepper__btn { display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; font: inherit; text-align: left; cursor: default; position: relative; z-index: 1; color: inherit; }
.stepper__item.is-done .stepper__btn { cursor: pointer; }
.stepper__dot {
  width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 2px solid var(--lilac-200); color: var(--muted); font-weight: 800; font-size: 15px;
  transition: background .3s, border-color .3s, color .3s, transform .3s var(--ease-back), box-shadow .3s;
}
.stepper__dot svg { display: none; width: 20px; height: 20px; fill: currentColor; }
.stepper__text { display: flex; flex-direction: column; padding-right: 12px; }
.stepper__text b { font-size: 15px; line-height: 20px; color: var(--muted); transition: color .3s; }
.stepper__text small { font-size: 12px; line-height: 16px; color: var(--muted); font-weight: 600; opacity: .8; }
.stepper__item.is-current .stepper__dot { background: var(--purple-500); border-color: var(--purple-500); color: #fff; transform: scale(1.08); box-shadow: 0 0 0 6px rgba(107, 53, 232, .14); }
.stepper__item.is-current .stepper__text b { color: var(--purple-900); }
.stepper__item.is-done .stepper__dot { background: var(--mint); border-color: var(--mint); color: #0F5C42; }
.stepper__item.is-done .stepper__dot > span { display: none; }
.stepper__item.is-done .stepper__dot svg { display: block; }
.stepper__item.is-done .stepper__text b { color: var(--purple-900); }
.stepper__item.is-done .stepper__btn:hover .stepper__dot { transform: scale(1.08); }

/* Painel do passo */
.co-panel { padding: 32px; border-radius: var(--r-2xl); background: rgba(255, 255, 255, .88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255, 255, 255, .95); box-shadow: var(--shadow-lifted); }
.co-step { animation: step-in .45s var(--ease-out); }
.co-step[hidden] { display: none; }
.co-step.is-back { animation-name: step-back; }
@keyframes step-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes step-back { from { opacity: 0; transform: translateX(-24px); } }
.co-step__head { margin-bottom: 22px; }
.co-step__count { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--purple-500); }
.co-step__title { margin: 4px 0 0; font-size: 26px; line-height: 32px; font-weight: 800; color: var(--purple-900); letter-spacing: -.01em; outline: none; }

/* Passo 1: planos */
.plans { display: flex; flex-direction: column; gap: 12px; }
.plan-opt {
  position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 18px 22px 18px 18px; border-radius: var(--r-xl); cursor: pointer; background: #fff;
  border: 2px solid var(--lilac-100); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease-out);
}
.plan-opt:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.plan-opt input, .period-seg__opt input, .pay-opt input { position: absolute; opacity: 0; pointer-events: none; }
.plan-opt:has(input:checked) { border-color: var(--purple-500); box-shadow: 0 0 0 4px rgba(107, 53, 232, .1), var(--shadow-soft); }
.plan-opt:has(input:focus-visible), .pay-opt:has(input:focus-visible), .period-seg__opt:has(input:focus-visible) { outline: 3px solid var(--purple-400); outline-offset: 3px; }
.plan-opt__art { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; }
.plan-opt__art--blue { background: linear-gradient(160deg, #E7F0FF, #D7E3FF); }
.plan-opt__art--pink { background: linear-gradient(160deg, #FCEBFB, #F6D9F5); }
.plan-opt__art img { width: 70px; height: auto; margin-top: -6px; filter: drop-shadow(0 6px 10px rgba(56, 16, 128, .2)); transition: transform .35s var(--ease-back); }
.plan-opt:has(input:checked) .plan-opt__art img { transform: rotate(-6deg) scale(1.08); }
.plan-opt__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.plan-opt__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan-opt__top b { font-size: 19px; line-height: 24px; color: var(--purple-900); }
.plan-opt__tag { font-style: normal; font-size: 12px; font-weight: 800; color: #7A5200; background: #FFE9A8; padding: 3px 10px; border-radius: var(--r-pill); }
.plan-opt__desc { font-size: 14px; line-height: 20px; color: var(--muted); font-weight: 600; }
.plan-opt__perks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; }
.plan-opt__perks > span { position: relative; padding-left: 20px; font-size: 13px; line-height: 18px; font-weight: 700; color: var(--ink); }
.plan-opt__perks > span::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 15px; height: 15px; border-radius: 50%; background: #DFF7EE; color: var(--mint-ink); font-size: 10px; display: grid; place-items: center; }
.plan-opt__perks .pill { font-style: normal; font-size: 11px; padding: 1px 7px; margin-left: 2px; }
.plan-opt__price { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.plan-opt__price small { font-size: 12px; font-weight: 700; color: var(--muted); }
.plan-opt__price b { font-size: 24px; line-height: 28px; font-weight: 800; color: var(--purple-900); letter-spacing: -.01em; }

/* Passo 1: período (segmentado, como no app) */
.co-sub + .co-sub { margin-top: 26px; }
.co-sub__label { margin: 0 0 10px; font-size: 15px; font-weight: 800; color: var(--purple-900); }
.period-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; border-radius: 22px; background: var(--lilac-50); border: 1px solid var(--lilac-100); }
.period-seg__opt { position: relative; cursor: pointer; border-radius: 16px; padding: 12px 16px; transition: background .2s, box-shadow .2s; }
.period-seg__opt > span { display: flex; flex-direction: column; gap: 2px; }
.period-seg__opt b { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--muted); }
.period-seg__opt small { font-size: 13px; font-weight: 600; color: var(--muted); }
.period-seg__opt:has(input:checked) { background: #fff; box-shadow: 0 6px 16px rgba(107, 53, 232, .14); }
.period-seg__opt:has(input:checked) b { color: var(--purple-900); }
.period-seg__opt.is-off { opacity: .45; cursor: not-allowed; }
.co-save { font-style: normal; background: var(--mint); color: #0F5C42; font-size: 12px; padding: 2px 8px; border-radius: var(--r-pill); }

/* Passo 2: formas de pagamento */
.pay-list { display: flex; flex-direction: column; gap: 10px; }
.pay-opt { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) 24px; gap: 16px; align-items: center; padding: 16px 20px 16px 16px; border-radius: var(--r-lg); background: #fff; border: 2px solid var(--lilac-100); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.pay-opt:hover { box-shadow: var(--shadow-soft); }
.pay-opt:has(input:checked) { border-color: var(--purple-500); box-shadow: 0 0 0 4px rgba(107, 53, 232, .1); }
.pay-opt__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--lilac-50); }
.pay-opt__icon svg { width: 24px; height: 24px; fill: var(--purple-500); }
.pay-opt__body { display: flex; flex-direction: column; gap: 2px; }
.pay-opt__body b { font-size: 16px; color: var(--purple-900); }
.pay-opt__body small { font-size: 13px; line-height: 18px; color: var(--muted); font-weight: 600; }
.pay-opt__radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--lilac-200); transition: border .2s; }
.pay-opt:has(input:checked) .pay-opt__radio { border: 7px solid var(--purple-500); }
.co-note { margin: 16px 0 0; padding: 14px 16px; border-radius: var(--r-md); background: rgba(223, 247, 238, .9); color: #136B4D; font-size: 14px; line-height: 20px; font-weight: 700; }

/* Passo 3: revisão e linha do tempo do teste */
.review { margin: 0; border-radius: var(--r-lg); border: 1px solid var(--lilac-100); background: #fff; }
.review__row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 16px 18px; }
.review__row + .review__row { border-top: 1px solid var(--lilac-100); }
.review dt { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.review dd { margin: 0; font-size: 16px; font-weight: 800; color: var(--purple-900); }
.review__edit { border: 0; background: none; color: var(--purple-500); font: 700 14px var(--font); cursor: pointer; padding: 6px 10px; border-radius: var(--r-pill); }
.review__edit:hover { background: var(--lilac-50); }

.timeline { list-style: none; margin: 22px 0 0; padding: 0; }
.timeline__item { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item:not(:last-child)::before { content: ""; position: absolute; left: 9px; top: 22px; bottom: 0; width: 2px; background: var(--lilac-200); }
.timeline__dot { width: 20px; height: 20px; flex: none; border-radius: 50%; background: #fff; border: 3px solid var(--lilac-200); margin-top: 2px; }
.timeline__item.is-now .timeline__dot { border-color: var(--purple-500); background: var(--purple-500); box-shadow: 0 0 0 5px rgba(107, 53, 232, .15); }
.timeline__item div { display: flex; flex-direction: column; gap: 2px; }
.timeline__item b { font-size: 15px; color: var(--purple-900); }
.timeline__item span { font-size: 14px; line-height: 20px; color: var(--muted); font-weight: 600; }
.timeline__item strong { color: var(--ink); }
.co-legal { margin: 22px 0 0; font-size: 13px; line-height: 19px; color: var(--muted); }
.co-legal a { color: var(--purple-500); font-weight: 700; }

/* Navegação entre passos */
.co-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--lilac-100); }
.btn--ghost { background: transparent; color: var(--purple-900); border: 0; box-shadow: none; padding: 0 16px; }
.btn--ghost:hover { background: var(--lilac-50); }
.co-actions__back[hidden] { display: inline-flex; visibility: hidden; }
.co-actions__next { min-width: 240px; }

/* Resumo */
.co-summary { position: sticky; top: 24px; }
.co-summary__card { border-radius: var(--r-2xl); overflow: hidden; background: rgba(255, 255, 255, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, .9); box-shadow: var(--shadow-lifted); }
.co-summary__art { aspect-ratio: 16 / 8; overflow: hidden; }
.co-summary__art img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; animation: co-zoom 16s ease-in-out infinite alternate; }
@keyframes co-zoom { to { transform: scale(1.07); } }
.co-summary__body { padding: 22px 24px 24px; }
.co-summary__title { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; font-weight: 800; color: var(--muted); margin: 0 0 12px; }
.co-summary__plan { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.co-summary__plan div { display: flex; flex-direction: column; }
.co-summary__plan div b { font-size: 20px; line-height: 26px; color: var(--purple-900); }
.co-summary__plan div span { font-size: 14px; color: var(--muted); font-weight: 600; }
.co-summary__plan > b { font-size: 15px; color: var(--purple-900); white-space: nowrap; padding-top: 3px; }
.co-perks { list-style: none; padding: 14px 0; margin: 14px 0 0; border-top: 1px dashed var(--lilac-200); border-bottom: 1px dashed var(--lilac-200); display: flex; flex-direction: column; gap: 8px; }
.co-perks li { position: relative; padding-left: 28px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--muted); }
.co-perks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #DFF7EE; color: var(--mint-ink); font-size: 11px; font-weight: 800; }
.co-perks .pill { font-style: normal; font-size: 11px; padding: 1px 7px; }
.co-line { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0 0; font-size: 15px; font-weight: 700; }
.co-line--mint { color: var(--mint-ink); }
.co-total { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 0 4px; }
.co-total span { font-weight: 800; color: var(--purple-900); }
.co-total strong { font-size: 34px; line-height: 40px; font-weight: 800; color: var(--purple-900); letter-spacing: -.02em; }
.co-next { margin: 0; font-size: 13px; line-height: 19px; color: var(--muted); }
.co-next b { color: var(--ink); }
.is-bump { animation: co-bump .45s var(--ease-back); }
@keyframes co-bump { 40% { transform: scale(1.03); } }

/* Tablet/celular: resumo compacto em cima */
@media (max-width: 960px) {
  .checkout { grid-template-columns: 1fr; gap: 20px; }
  .co-summary { position: static; }
  .co-summary__art, .co-summary__card .co-perks, .co-summary__card .co-line, .co-summary__title { display: none; }
  .co-summary__body { padding: 16px 18px; }
  .co-total { padding: 6px 0 0; }
  .co-total strong { font-size: 24px; line-height: 30px; }
}
/* Celular: stepper enxuto e ações fixas embaixo */
@media (max-width: 640px) {
  .checkout { padding-bottom: 120px; }
  .stepper__text small { display: none; }
  .stepper__text b { font-size: 13px; }
  .stepper__btn { flex-direction: column; align-items: flex-start; gap: 6px; }
  .stepper__dot { width: 34px; height: 34px; font-size: 14px; }
  .stepper__item { align-items: flex-start; }
  .stepper__item:not(:last-child)::after { margin: 16px 8px 0 -4px; }
  .co-panel { padding: 22px 18px; border-radius: var(--r-xl); }
  .co-step__title { font-size: 22px; line-height: 28px; }
  .plan-opt { grid-template-columns: 52px minmax(0, 1fr); align-items: start; padding: 16px; gap: 12px 14px; }
  .plan-opt__art { width: 52px; height: 52px; border-radius: 16px; }
  .plan-opt__art img { width: 48px; margin-top: -4px; }
  .plan-opt__price { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px; white-space: nowrap; }
  .plan-opt__price b { font-size: 20px; }
  .period-seg { grid-template-columns: 1fr; }
  .review__row { grid-template-columns: 1fr auto; }
  .review dt { grid-column: 1 / -1; }
  .co-actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--lilac-100);
  }
  .co-actions__back[hidden] { display: none; }
  .co-actions__next { flex: 1; min-width: 0; }
}

/* Confirmação */
.co-done { width: min(480px, calc(100% - 32px)); border: 0; padding: 96px 28px 28px; border-radius: var(--r-2xl); background: #fff; box-shadow: var(--shadow-lifted); text-align: center; overflow: visible; }
.co-done::backdrop { background: rgba(30, 14, 74, .45); backdrop-filter: blur(4px); }
.co-done[open] { animation: co-pop .45s var(--ease-back); }
@keyframes co-pop { from { transform: translateY(24px) scale(.94); opacity: 0; } }
.co-done__crown { position: absolute; left: 50%; top: -58px; width: 130px; transform: translateX(-50%); animation: bob 4.4s ease-in-out infinite; }
.co-done h2 { color: var(--purple-900); }
.co-done p { color: var(--muted); font-size: 15px; line-height: 22px; margin: 12px 0 0; }
.co-done p b { color: var(--purple-900); }
.co-done__hint { font-weight: 700; color: var(--purple-500) !important; }
.co-done__ctas { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.co-done__ctas .btn { width: 100%; }

.co-footer { margin-top: 0; }
@media (max-width: 640px) { .co-footer { padding-bottom: 100px; } }
