/* Checkout. Builds on style.css: black page, lime for what is chosen or done,
   the order summary as a white card like the plan card on the landing page. */

.co-secure { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--t2); }

.co { padding-block: clamp(32px, 5vw, 56px) 96px; }
.co__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 5vw, 64px); align-items: start; }
.co__main { min-width: 0; }

/* steps */
.co-steps { list-style: none; margin: 0 0 clamp(36px, 5vw, 52px); padding: 0; display: flex; gap: 12px; }
.co-steps li { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--t3); }
.co-steps li:not(:last-child)::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.co-steps li.is-done:not(:last-child)::after { background: var(--accent); }
.co-steps b { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font: 500 11px/1 var(--f-mono); background: var(--s3); color: var(--t2); }
.co-steps li.is-on { color: #fff; }
.co-steps li.is-on b { background: #fff; color: #000; }
.co-steps li.is-done { color: #fff; }
.co-steps li.is-done b { background: var(--accent); color: #000; font-size: 0; }
.co-steps li.is-done b::before { content: "✓"; font-size: 12px; }

/* type */
.co-h1 { margin: 0; font: 500 clamp(36px, 4vw + 10px, 56px)/1 var(--f-display); letter-spacing: -.045em; }
.co-h2 { margin: 0; font: 500 22px/1.2 var(--f-display); letter-spacing: -.03em; }
.co-lead { margin-top: 14px; max-width: 52ch; font-size: 17px; line-height: 1.45; color: var(--t2); letter-spacing: -.015em; }
.co-text { color: var(--t2); line-height: 1.5; }
.co-label { font-size: 13px; font-weight: 500; }
.co-label.dim { font-weight: 400; color: var(--t3); font-size: 12px; }
.co-hint { font-size: 12px; color: var(--t3); }
.co-card { margin-top: 16px; border-radius: var(--r); background: var(--s1); box-shadow: inset 0 0 0 1px var(--line-2); }

/* coin picker */
.co-picker { margin-top: 36px; }
.co-assets { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 16px 8px; }
.co-asset { width: 72px; display: grid; justify-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; font-size: 12px; font-weight: 500; color: var(--t3); transition: color .2s; }
.co-asset:hover, .co-asset.is-on { color: #fff; }
.co-asset__ring { position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, transform .3s var(--ease-out); }
.co-asset__ring img { width: 30px; height: 30px; border-radius: 50%; opacity: .7; filter: grayscale(.4); transition: opacity .2s, filter .2s; }
.co-asset:hover .co-asset__ring img, .co-asset.is-on .co-asset__ring img { opacity: 1; filter: none; }
.co-asset.is-on .co-asset__ring { box-shadow: 0 0 0 2px var(--accent), 0 0 24px -6px rgba(200,241,53,.7); transform: translateY(-2px); }
.co-asset__n { position: absolute; top: -4px; right: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 600 10px/1 var(--f-body); font-style: normal; color: #fff; background: var(--s3); box-shadow: 0 0 0 2px #000; }
.co-asset--ghost { width: 56px; height: 56px; margin: 0 8px 20px; border-radius: 50%; background: var(--s2); animation: coPulse 1.4s ease-in-out infinite; }
@keyframes coPulse { 50% { opacity: .45; } }

.co-networks { margin-top: 28px; }
.co-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.co-seg { --n: 2; margin-top: 12px; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--s2); }
.co-seg button { display: grid; gap: 2px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; color: var(--t2); transition: background-color .2s, color .2s; }
.co-seg button:hover { color: #fff; }
.co-seg button.is-on { background: var(--s3); color: #fff; box-shadow: inset 0 0 0 1px rgba(200,241,53,.5); }
.co-seg b { font-size: 13px; font-weight: 500; }
.co-seg span { font-size: 11px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-net-note { margin-top: 10px; }
.co-error { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 12px; background: var(--s2); color: var(--t2); font-size: 14px; }

/* quote */
.co-quote { margin-top: 28px; }
.co-quote__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px; }
.co-quote__amt { margin: 6px 0 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.co-quote__amt b { font: 500 clamp(36px, 4vw, 48px)/1 var(--f-mono); letter-spacing: -.05em; }
.co-quote__amt span { font-size: 17px; color: var(--t2); }
.co-quote__logo { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.co-quote__cta { padding: 20px 24px 24px; border-top: 1px solid var(--line); }
.co-skel { display: inline-block; width: 160px; height: 40px; border-radius: 10px; background: var(--s3); vertical-align: middle; animation: coPulse 1.4s ease-in-out infinite; }
.co-warn { margin: 0 24px 20px; padding: 12px 14px 12px 38px; border-radius: 12px; position: relative; font-size: 13px; line-height: 1.45; color: #ffe2a8; background: rgba(255,178,36,.08); }
.co-warn::before { content: "!"; position: absolute; left: 14px; top: 12px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font: 700 10px/1 var(--f-body); color: #000; background: var(--amber); }
.co-cta { height: 52px; font-size: 16px; border-radius: 12px; }
.co-btn-lg { height: 48px; font-size: 15px; border-radius: 12px; margin-top: 12px; }
.co-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(0,0,0,.2); border-top-color: #000; animation: coSpin .7s linear infinite; }
@keyframes coSpin { to { transform: rotate(360deg); } }

/* payment */
.co-pill { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; margin-bottom: 20px; font-size: 12px; color: var(--accent); background: rgba(200,241,53,.08); box-shadow: inset 0 0 0 1px rgba(200,241,53,.3); }
.co-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: coPulse 1.4s ease-in-out infinite; }
.co-pay { margin-top: 32px; padding: 24px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; }
.co-qr { margin: 0; display: grid; justify-items: center; gap: 10px; align-content: start; }
.co-qr__box { width: 200px; height: 200px; padding: 12px; border-radius: 14px; background: #fff; }
.co-qr__box svg { display: block; width: 100%; height: 100%; }
.co-qr__box svg rect[fill="white"], .co-qr__box svg rect[fill="#ffffff"] { fill: #fff; }
.co-pay__fields { min-width: 0; display: grid; gap: 18px; align-content: start; }
.co-pay__fields .co-warn { margin: 0; }
.co-field .co-label { margin-bottom: 8px; }
.co-copy { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 14px; border: 0; border-radius: 12px; text-align: left; cursor: pointer; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); color: #fff; transition: box-shadow .2s; }
.co-copy:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.co-copy__val { min-width: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.4; }
.co-copy__btn { flex: none; padding: 5px 9px; border-radius: 7px; font-size: 12px; color: var(--t2); background: var(--s3); transition: background-color .2s, color .2s; }
.co-copy.is-copied .co-copy__btn { color: #000; background: var(--accent); }
.co-amount { display: flex; align-items: center; gap: 10px; }
.co-amount img { width: 22px; height: 22px; border-radius: 50%; }
.co-amount b { font: 500 22px/1 var(--f-mono); letter-spacing: -.04em; }
.co-pay__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.co-status, .co-expiry { padding: 20px 24px; }
.co-checks { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 10px; font-size: 14px; color: var(--t3); }
.co-checks li { display: flex; align-items: center; gap: 10px; }
.co-checks li::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); }
.co-checks li.is-on { color: #fff; }
.co-checks li.is-on::before { box-shadow: inset 0 0 0 1px var(--accent); background: radial-gradient(circle, var(--accent) 0 3px, transparent 3.5px); animation: coPulse 1.4s ease-in-out infinite; }
.co-checks li.is-done { color: #fff; }
.co-checks li.is-done::before { box-shadow: none; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.5l2.2 2.2L11.5 5.8' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.co-expiry__t { margin-top: 8px; font-size: 40px; font-weight: 500; letter-spacing: -.05em; }
.co-keep { margin-top: 16px; }

/* done, underpaid, missing */
.co-tick { width: 72px; height: 72px; margin-bottom: 24px; border-radius: 50%; display: grid; place-items: center; color: #000; background: var(--accent); animation: coPop .6s var(--ease-out) both; }
.co-tick svg { width: 40px; height: 40px; }
.co-tick path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: coDraw .5s var(--ease-out) .25s forwards; }
@keyframes coPop { from { transform: scale(.5); opacity: 0; } }
@keyframes coDraw { to { stroke-dashoffset: 0; } }
.co-bang { width: 64px; height: 64px; margin-bottom: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 30px/1 var(--f-display); color: var(--amber); background: rgba(255,178,36,.12); }
#step-done .co-cta { margin-top: 32px; }
.co-access { padding: 24px; display: grid; gap: 14px; }
.co-access .co-btn-lg { margin-top: 0; }
.co-next { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--t2); line-height: 1.45; }
.co-next li { display: flex; gap: 12px; }
.co-next b { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 500 11px/1 var(--f-mono); color: #000; background: var(--accent); }
.co-btns { margin-top: 28px; }
.co-btns .btn { height: 44px; padding: 0 18px; font-size: 15px; }

/* order summary */
.co__side { position: sticky; top: 88px; }
.co-sum { border-radius: var(--r); background: #fff; color: #000; overflow: hidden; }
.co-sum__label { padding: 24px 24px 0; font-size: 12px; color: rgba(0,0,0,.5); }
.co-sum__name { margin: 10px 24px 0; font: 600 18px/1.25 var(--f-body); letter-spacing: -.02em; }
.co-sum__name span { display: block; margin-top: 2px; font-weight: 400; font-size: 14px; color: rgba(0,0,0,.6); }
.co-sum__price { margin: 20px 24px 0; display: flex; align-items: baseline; gap: 10px; }
.co-sum__price b { font: 600 56px/.9 var(--f-display); letter-spacing: -.05em; }
.co-sum__price span { font-size: 13px; color: rgba(0,0,0,.55); }
.co-sum__list { list-style: none; margin: 20px 24px 0; padding: 18px 0 22px; border-top: 1px solid rgba(0,0,0,.1); display: grid; gap: 10px; font-size: 14px; line-height: 1.4; }
.co-sum__list li { position: relative; padding-left: 24px; }
.co-sum__list li::before { content: ""; position: absolute; left: 0; top: 2px; width: 14px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l2.8 2.8L12.5 5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.co-sum__cells { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(0,0,0,.1); background: var(--accent); }
.co-sum__cells span { padding: 12px 6px; text-align: center; font-size: 11px; font-weight: 500; }
.co-sum__cells span + span { border-left: 1px solid rgba(0,0,0,.12); }
.co-side__note { margin-top: 14px; padding-inline: 4px; font-size: 12px; line-height: 1.5; color: var(--t3); }
.co-side__note a { color: var(--t2); text-decoration: underline; text-underline-offset: 2px; }
.co-side__note a:hover { color: #fff; }

/* toasts */
.co-toasts { position: fixed; left: 0; right: 0; bottom: max(20px, env(safe-area-inset-bottom, 0px)); z-index: 60; display: grid; justify-items: center; gap: 8px; padding: 0 16px; pointer-events: none; }
.co-toast { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; font-size: 13px; color: #fff; background: rgba(20,20,20,.92); box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 40px -10px rgba(0,0,0,.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: coIn .35s var(--ease-out); transition: opacity .3s, transform .3s; }
.co-toast::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.co-toast--err { box-shadow: inset 0 0 0 1px rgba(255,84,112,.4), 0 20px 40px -10px rgba(0,0,0,.6); }
.co-toast--err::before { background: var(--down); }
.co-toast.is-out { opacity: 0; transform: translateY(6px); }
@keyframes coIn { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 960px) {
  .co__grid { grid-template-columns: minmax(0, 1fr); }
  .co__side { position: static; }
}
@media (max-width: 640px) {
  .co-steps span { display: none; }
  .co-steps li:last-child { flex: none; }
  .co-assets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 0; }
  .co-asset { width: auto; }
  .co-asset--ghost { margin: 0 auto 20px; }
  .co-seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-quote__top, .co-access { padding: 20px; }
  .co-warn { margin: 0 20px 18px; }
  .co-quote__cta { padding: 18px 20px 20px; }
  .co-pay { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 22px; }
  .co-pay__meta { grid-template-columns: minmax(0, 1fr); }
  .co-secure { font-size: 12px; }
  .co-sum__cells span { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .co-tick path { stroke-dashoffset: 0; }
}
