/* ===== "The check-out desk" slide =====
   Sits between The Product (Skylight) and Storefront. Two synced panels telling the same visit
   two ways: a Skylight check-out card (ported from the advocate-health deck's animated
   add-treatments card) where everything added mid-visit is collected at the desk, and a paper
   "PATIENT STATEMENT" that receives the identical line items, then visibly ages — day ticker,
   PAST DUE stamp, and per-item recovery bars draining to the 65% mail-cycle yield. The pink
   loss color is --d-unpaid from the RCM slide so "never collected" reads the same across both. */

.s-ckout { --loss: #FF6F90; }

.cko {
  width: min(1560px, 100%);
  position: relative;
  display: grid;
  grid-template-columns: 36% minmax(0, 1fr);
  gap: clamp(20px, 3vw, 48px);
  height: 100%;
  align-content: center;
  align-items: center;
}
.cko__copy { max-width: 34ch; }
/* The slide title needs its own rule: styles.css sizes .title per layout container
   (`.wrap .title`, `.prod .title`, `.store .title`), and `.cko` matches none of them, so without
   this the header silently falls back to a 24px default while the Product and Storefront slides
   either side of it render at 34.56px. Same clamp as those two on purpose — this slide sits
   between them and a smaller header reads as a mistake. */
.cko .title { font-size: clamp(26px, 2.7vw, 48px); margin-top: clamp(10px, 1.6vh, 20px); }
/* The shared .prod__intro size sits too close to the slide title at this column width —
   step the subhead down and soften it so the header clearly leads. */
.cko .prod__intro { font-size: clamp(13px, 1.15vw, 18px); line-height: 1.45; color: rgba(255, 255, 255, .85); max-width: 36ch; }
.cko__loss { color: var(--loss); }

.cko__visuals { display: flex; flex-direction: column; gap: clamp(16px, 2.6vh, 28px); }
.cko__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 1.8vw, 28px);
  align-items: start;
}
/* The two-endings payoff line sits centered under both cards, quoting the same JS-computed
   numbers the cards animate to. */
.cko__stat {
  text-align: center; margin: 0 auto; max-width: 46ch;
  font-size: clamp(14px, 1.4vw, 22px); line-height: 1.3; color: #fff;
}
.cko__stat strong { font-weight: 700; }
.cko__panel { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cko__label {
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255, 255, 255, .62); text-align: center;
}
.cko__label b { font-weight: 400; color: #fff; }

.cko-stage { width: 100%; max-width: 340px; position: relative; }

/* ---- Frequency tag: how often providers add this mid-visit ---- */
.cko-freqtag {
  display: inline-block; width: fit-content; font-size: 7.8px; font-weight: 700;
  letter-spacing: .02em; text-transform: uppercase; padding: 1.5px 6px; border-radius: 999px;
  background: rgba(0, 152, 255, .15); color: rgb(0, 105, 190); margin-top: 2px;
}

/* ---- Panel A: Skylight payment widget, same visual language as the Product slide's Experity
   mockup (.xm-widget in product-mockup.css): white card, gray pill + red-dot price chip top row,
   bold headline, bordered appointment box, big #0098FF price, black "Send to card reader ›"
   pill. Same tokens — #12151B ink, #8A93A3 gray, #ECEDF1/#F0F1F4 borders — at fixed px sizes
   for this ~340px standalone card instead of the mockup's container-query units. ---- */
.cko-desk {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 20, 55, .28);
  padding: 13px 14px 14px;
  color: #12151B;
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  display: flex; flex-direction: column; gap: 9px;
  position: relative;
}
.cko-desk__top { display: flex; align-items: center; gap: 8px; }
.cko-desk__pillsm { font-size: 9.5px; font-weight: 600; color: #2C3444; background: #F0F1F4; border-radius: 999px; padding: 3px 9px; }
.cko-desk__chip {
  margin-left: auto; font-size: 10px; font-weight: 700; color: #2C3444; background: #fff;
  border: 1px solid #E6E8EE; border-radius: 999px; padding: 3px 9px;
  display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums;
}
.cko-desk__chip i { width: 5px; height: 5px; border-radius: 50%; background: #E0455B; display: inline-block; transition: background .4s ease; }
.cko-desk.is-paid .cko-desk__chip i { background: #1F8A50; }
.cko-desk__h { font-size: 12.5px; font-weight: 700; color: #12151B; line-height: 1.25; margin: 0; }

.cko-desk__appt { display: flex; align-items: center; gap: 9px; border: 1px solid #ECEDF1; border-radius: 8px; padding: 7px 9px; }
.cko-desk__date { text-align: center; border-right: 1px solid #ECEDF1; padding-right: 9px; line-height: 1.1; }
.cko-desk__date b { display: block; font-size: 13px; color: #12151B; }
.cko-desk__date small { font-size: 6.5px; color: #8A93A3; letter-spacing: .04em; }
.cko-desk__info { display: flex; flex-direction: column; gap: 1px; }
.cko-desk__info span { font-size: 9.5px; color: #12151B; font-weight: 600; }
.cko-desk__info small { font-size: 8.5px; color: #8A93A3; }

.cko-desk__list { border: 1px solid #E9EAEE; border-radius: 8px; overflow: hidden; }
/* Both bills start empty (the base visit was paid at check-in) — collapse the empty chrome
   until the first add-on lands so there's no stray bordered sliver. */
.cko-desk__list:has(> div:empty) { display: none; }
.cko-bill__rows:empty { display: none; }
.cko-desk__row {
  padding: 8px 10px; border-bottom: 1px solid #F0F1F4;
  display: flex; flex-direction: column; gap: 5px; font-size: 10.5px; font-weight: 600; color: #2C3444;
  opacity: 0; transform: translateY(4px); transition: opacity .4s ease, transform .4s ease;
}
.cko-desk__row:last-child { border-bottom: none; }
.cko-desk__row.is-in { opacity: 1; transform: none; }
.cko-desk__rowtop { display: flex; align-items: center; justify-content: space-between; }
.cko-desk__rowtop span:last-child { font-variant-numeric: tabular-nums; color: #12151B; }
.cko-desk__explain {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 8.5px; line-height: 1.35;
  font-weight: 400; color: #4B5568; border-radius: 6px; padding: 4px 7px;
  background: #F4F5F8; border: 1px solid #E6E8EE;
}
.cko-desk__tag {
  display: inline-block; background: #fff; border: 1px solid #E6E8EE; border-radius: 5px;
  padding: 1px 5px; font-size: 8px; font-family: ui-monospace, Menlo, monospace; letter-spacing: -.01em;
}

.cko-desk__addwrap {
  max-height: 0; overflow: hidden; border-radius: 8px; background: #FAFAFC; border: 1px solid transparent;
  opacity: 0; transition: max-height .5s cubic-bezier(.22, 1, .36, 1), opacity .4s ease, border-color .4s ease;
}
.cko-desk__addwrap.is-open { max-height: 168px; opacity: 1; border-color: #E9EAEE; }
.cko-desk__addhead { font-size: 8.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #98A0AE; padding: 8px 10px 2px; }
.cko-desk__addlist { max-height: 140px; overflow-y: auto; }
.cko-desk__addrow { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; font-size: 10px; font-weight: 600; color: #2C3444; transition: opacity .3s ease; gap: 8px; }
.cko-desk__addname { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
/* The +/× glyph is drawn with two centered pseudo-element bars instead of a text "+" — font
   glyph metrics sat the character visibly off-center inside the circle. */
.cko-desk__plus {
  position: relative; display: inline-block; width: 16px; height: 16px;
  flex-shrink: 0; border-radius: 999px; border: 1px solid #D8DBE2; font-size: 0; color: #4B5568;
  transition: background .3s ease, border-color .3s ease, color .3s ease, transform .3s ease;
}
.cko-desk__plus::before, .cko-desk__plus::after { content: ''; position: absolute; left: 50%; top: 50%; background: currentColor; border-radius: 1px; }
.cko-desk__plus::before { width: 8px; height: 1.3px; transform: translate(-50%, -50%); }
.cko-desk__plus::after { width: 1.3px; height: 8px; transform: translate(-50%, -50%); }
.cko-desk__addrow.is-added .cko-desk__plus {
  background: var(--blue); border-color: var(--blue); color: #fff; transform: scale(1.15) rotate(45deg);
}
.cko-desk__addrow.is-added { opacity: .4; }

.cko-desk__actions { display: flex; justify-content: center; }
.cko-desk__btn {
  border: 1px solid #E1E4EA; background: #EEF0F4; border-radius: 999px;
  padding: 4px 12px; font-size: 9.5px; font-weight: 600; color: #3A4459; font-family: inherit;
  transition: box-shadow .3s ease, transform .3s ease;
}
.cko-desk__btn.is-active { box-shadow: 0 0 0 4px rgba(0, 152, 255, .28); transform: scale(1.05); }

/* Price row mirrors the mockup widget: big blue price left, black card-reader pill right.
   The pill crossfades to the paid receipt in place so the card never changes height mid-loop. */
.cko-desk__pricerow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 2px; }
.cko-desk__price { font-size: 19px; font-weight: 800; color: #0098FF; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.cko-desk__pay { position: relative; height: 26px; flex: 1; max-width: 172px; }
.cko-desk__cta, .cko-desk__paid {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5px;
  border-radius: 999px; font-size: 9.5px; font-weight: 700; white-space: nowrap;
  transition: opacity .4s ease, box-shadow .3s ease, transform .3s ease;
}
.cko-desk__cta { border: none; background: #12151B; color: #fff; font-family: inherit; }
.cko-desk__cta i { font-style: normal; }
.cko-desk__cta.is-armed { box-shadow: 0 0 0 5px rgba(0, 152, 255, .30); transform: scale(1.03); }
.cko-desk__paid { background: #fff; border: 1px solid #E6E8EE; color: #12151B; opacity: 0; font-weight: 600; }
.cko-desk__paid b { color: #1F8A50; font-weight: 700; }
.cko-desk.is-paid .cko-desk__cta { opacity: 0; }
.cko-desk.is-paid .cko-desk__paid { opacity: 1; }

/* ---- Stamps (both panels): rotated mono badge that "thumps" in ---- */
.cko-stamp {
  position: absolute; z-index: 5; pointer-events: none;
  font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase;
  border: 2px solid currentColor; border-radius: 6px; padding: 5px 10px;
  opacity: 0; transform: rotate(-8deg) scale(1.7);
  transition: opacity .28s ease, transform .38s cubic-bezier(.2, 1.6, .4, 1);
}
.cko-stamp.is-on { opacity: 1; transform: rotate(-8deg) scale(1); }
.cko-stamp--paid { top: -12px; right: -10px; font-size: 9.5px; color: rgb(0, 105, 190); background: rgba(255, 255, 255, .92); }
.cko-stamp--due {
  top: 42%; left: 50%; font-size: 15px; padding: 7px 16px;
  color: var(--loss); background: rgba(255, 255, 255, .55);
  transform: translate(-50%, -50%) rotate(-10deg) scale(1.7);
}
.cko-stamp--due.is-on { opacity: .92; transform: translate(-50%, -50%) rotate(-10deg) scale(1); }

/* ---- Panel B: mailed paper statement ---- */
.cko-bill {
  background: #fff; border-radius: 6px; box-shadow: 0 20px 45px -12px rgba(0, 0, 0, .35);
  padding: 14px 14px 12px; color: var(--ink); font-family: var(--mono);
  display: flex; flex-direction: column; gap: 10px; position: relative;
}
.cko-bill__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 9.5px; letter-spacing: .08em;
}
.cko-bill__day {
  font-size: 9px; padding: 2px 7px; border: 1px solid rgba(11, 18, 32, .3); border-radius: 999px;
  font-variant-numeric: tabular-nums; transition: color .3s ease, border-color .3s ease;
}
.cko-bill.is-aged .cko-bill__day { color: var(--loss); border-color: var(--loss); }
.cko-bill__addr { display: flex; flex-direction: column; gap: 4px; }
.cko-bill__addr i { display: block; height: 5px; border-radius: 3px; background: rgba(11, 18, 32, .12); }
.cko-bill__addr i:nth-child(1) { width: 42%; }
.cko-bill__addr i:nth-child(2) { width: 60%; }
.cko-bill__addr i:nth-child(3) { width: 34%; }

.cko-bill__rows { display: flex; flex-direction: column; border-top: 1px dashed rgba(11, 18, 32, .25); }
.cko-bill__row {
  padding: 8px 0 9px; border-bottom: 1px dashed rgba(11, 18, 32, .18);
  display: flex; flex-direction: column; gap: 5px;
  opacity: 0; transform: translateY(4px); transition: opacity .4s ease, transform .4s ease;
}
.cko-bill__row.is-in { opacity: 1; transform: none; }
.cko-bill__rowtop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 9.5px; }
.cko-bill__rowtop span:last-child { font-variant-numeric: tabular-nums; transition: color .5s ease; }
.cko-bill.is-aged .cko-bill__row:not(.cko-bill__row--prepaid) .cko-bill__rowtop span:last-child { color: rgba(11, 18, 32, .45); }
.cko-bill__paidtag {
  width: fit-content; font-size: 8px; letter-spacing: .06em; text-transform: uppercase;
  color: #1F8A50; border: 1px solid currentColor; border-radius: 999px; padding: 1px 7px;
}
/* Recovery bar: the dark fill is what the mail cycle eventually collects; the pink it exposes
   as it drains is the share that never arrives. Fill width is set by JS from the yield constant. */
.cko-bill__track { height: 4px; border-radius: 2px; background: rgba(255, 111, 144, .45); overflow: hidden; }
.cko-bill__fill { display: block; height: 100%; width: 100%; background: rgba(11, 18, 32, .8); transition: width 2.6s cubic-bezier(.4, 0, .3, 1); }

.cko-bill__foot { display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.cko-bill__footrow { display: flex; align-items: baseline; justify-content: space-between; font-size: 9px; letter-spacing: .05em; opacity: 0; transition: opacity .5s ease; }
.cko-bill__footrow.is-in { opacity: 1; }
.cko-bill__footrow b { font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; }
.cko-bill__footrow--loss { color: var(--loss); }
.cko-bill__footrow--loss b { font-size: 16px; }

/* ---- Responsive: match the deck's 1100px stack ---- */
@media (max-width: 1100px) {
  .cko { display: flex; flex-direction: column; align-items: stretch; }
  .cko__copy { max-width: none; }
  .cko__visuals { margin-top: 26px; }
  .cko__label { font-size: 9px; }
}
@media (max-width: 800px) {
  .cko__cards { grid-template-columns: 1fr; justify-items: center; }
  .cko-desk { padding: 10px; border-radius: 14px; gap: 6px; }
  .cko-desk__total span:last-child { font-size: 16px; }
}
