/* Phase 5: checkout, payment, completion and the admin orders and providers. Every status also
   carries an icon and a word, never color alone. */

/* ---------- Checkout ---------- */
.co .flow-head { margin-bottom: var(--s-5); }
.co-grid { align-items: start; }
.co-sec { padding: var(--s-5); display: grid; gap: var(--s-4); }
.co-sec-head { display: flex; align-items: center; gap: var(--s-3); }
.co-sec-head .i { color: var(--accent); }
.co-sec-end { margin-left: auto; }
.co-n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-cap); font-weight: var(--fw-bold); flex: none; }
.co-secure { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-cap); color: var(--text-2); }
.co .field > label { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-2); }
.co-opt { font-weight: var(--fw-regular); color: var(--text-3); }
.co-wide { grid-column: 1 / -1; }
.co .input, .co .textarea { min-height: 48px; font-size: 16px; } /* 16px keeps phones from zooming in */
.co-banner { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-lg); margin-bottom: var(--s-4); background: var(--accent-tint); animation: om-enter var(--t-base) var(--ease); }
.co-banner > .i { flex: none; margin-top: 2px; color: var(--accent); }
.co-banner b { display: block; font-size: var(--fs-sm); }
.co-banner p { font-size: var(--fs-xs); color: var(--text-2); margin: 2px 0 0; }
.co-banner .btn { margin-top: var(--s-3); }
.co-banner.is-warn { background: #FFF7E8; border: 1px solid #F2D49B; }
.co-banner.is-warn > .i { color: #9A5B00; }
.co-banner.is-error { background: var(--danger-tint); }
.co-banner.is-error > .i, .co-banner.is-error b { color: var(--danger); }

/* Order summary */
.co-summary { gap: var(--s-3); max-height: calc(100vh - 110px); overflow-y: auto; }
.co-sum-title { color: var(--text); }
.co-group { display: grid; }
.co-group > .eyebrow { font-size: 11px; color: var(--text-3); padding: var(--s-2) 0 2px; }
.co-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); padding: var(--s-2) 0; border-top: 1px solid var(--border); }
.co-group .co-line:first-of-type { border-top: 0; }
.co-line-main { min-width: 0; display: grid; gap: 1px; }
.co-line-main b { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.co-line-main small { font-size: var(--fs-cap); color: var(--text-2); }
.co-line-main .co-note { color: var(--text-3); }
.co-line-amt { text-align: right; display: grid; justify-items: end; align-content: start; gap: 2px; }
.co-today { font-size: 11px; font-weight: var(--fw-semibold); color: var(--accent); white-space: nowrap; }
.co-changed { display: inline-flex; align-items: center; gap: 4px; color: #7A4800 !important; font-weight: var(--fw-semibold); }
.co-line.is-changed { background: #FFF7E8; margin-inline: calc(var(--s-3) * -1); padding-inline: var(--s-3); border-radius: var(--r-sm); }
.co-totals { display: grid; gap: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--border-strong); }
.co-due { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.co-due span { font-size: var(--fs-sm); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: var(--track-caps); color: var(--text-2); }
.co-due b { font-size: 28px; font-weight: var(--fw-bold); letter-spacing: -0.02em; }
.co-kinds { display: grid; gap: 4px; margin-top: calc(var(--s-2) * -1); }
.co-kinds div { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--text-2); }
.co-then, .co-later { display: grid; gap: 6px; padding: var(--s-3); border-radius: var(--r-md); background: var(--bg-2); }
.co-then .srow b { font-size: var(--fs-body); }
.co-later div { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-xs); color: var(--text-2); }
.co-injured { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--s-3); padding: var(--s-3); border-radius: var(--r-md); border: 1px dashed var(--border-strong); align-items: start; }
.co-injured .inj-logo { width: 32px; height: 32px; grid-row: span 2; margin-top: 2px; }
.co-injured b { font-size: var(--fs-xs); display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.co-injured small { font-size: var(--fs-cap); color: var(--text-2); }
.co-msum { padding: 0; overflow: hidden; }
.co-msum-head { display: flex; align-items: center; gap: var(--s-3); width: 100%; padding: var(--s-4); text-align: left; }
.co-msum-head > span:first-child { flex: 1; min-width: 0; display: grid; }
.co-msum-head small { font-size: var(--fs-cap); color: var(--text-2); }
.co-msum-amt { display: grid; justify-items: end; }
.co-msum-amt b { font-size: var(--fs-h3); }
#co-msum-body { padding: 0 var(--s-4) var(--s-4); display: grid; gap: var(--s-3); }

/* Payment */
.co-slot { min-height: 150px; }
.co-portal { position: absolute; z-index: 3; }
.co-method { display: grid; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-lg); border: 1.5px solid var(--border-strong); background: var(--surface); }
.co-method-head { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-2); }
.co-testcard { display: flex; justify-content: space-between; align-items: center; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: linear-gradient(135deg, #0B6FC9, #48607F); color: #fff; }
.co-testcard span { font-size: var(--fs-cap); opacity: 0.85; text-transform: uppercase; letter-spacing: var(--track-caps); }
.co-testcard b { font-size: var(--fs-body); letter-spacing: 0.08em; }
.co-outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.co-outcomes .choice { min-height: 52px; padding: var(--s-2) var(--s-3); }
.co-outcomes .choice-main b { font-size: var(--fs-sm); }
.co-nopay { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-lg); background: var(--bg-2); font-size: var(--fs-sm); color: var(--text-2); }
.co-nopay .i { color: var(--accent); flex: none; margin-top: 2px; }
.co-commit { display: grid; gap: 6px; padding: var(--s-4); border-radius: var(--r-lg); background: var(--bg-2); }
.co-rec-line { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-sm); color: var(--text-2); }
.co-rec-line b { color: var(--text); font-size: var(--fs-body); }
.co-acks { display: grid; gap: var(--s-2); }
.co-check { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-sm); line-height: 1.4; cursor: pointer; }
.co-check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--accent); }
.co-check a { color: var(--accent); font-weight: var(--fw-semibold); text-decoration: underline; text-underline-offset: 2px; }
.co-ack .field-err { margin-left: 34px; display: block; }
.co-fail { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-lg); background: var(--danger-tint); outline: none; animation: om-enter var(--t-base) var(--ease); }
.co-fail > .i { color: var(--danger); flex: none; margin-top: 2px; }
.co-fail b { display: block; color: var(--danger); font-size: var(--fs-sm); }
.co-fail p { font-size: var(--fs-xs); color: var(--text-2); margin: 2px 0 var(--s-3); }
.co-fail-why { display: block; margin-top: 4px; color: var(--text); }
.co-pay-wrap { display: grid; gap: var(--s-2); }
.co-pay { min-height: 56px; font-size: var(--fs-body); }
.co-fine { text-align: center; }
.co-appts { display: grid; gap: var(--s-2); }

/* ---------- Completion ---------- */
.rc-number { font-variant-numeric: tabular-nums; color: var(--text); letter-spacing: 0.02em; }
.rc-injured { border-color: var(--accent-bright); box-shadow: inset 0 0 0 1px var(--accent-bright); }
.rc-inj-head { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.rc-inj-head .inj-logo { width: 36px; height: 36px; flex: none; }
/* After checkout, in two steps: the provider finishes their Injured Connect profile, then our team
   reaches out. A line joins the two numbers. */
.inj-steps { display: grid; }
.inj-steps li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--s-3); padding-bottom: var(--s-4); }
.inj-steps li:last-child { padding-bottom: 0; }
.inj-steps li:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; border-radius: 1px; background: var(--accent-tint-2); }
.inj-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--accent); border: 2px solid var(--accent-bright); font-weight: var(--fw-bold); font-size: var(--fs-sm); }
.inj-steps li.is-now .inj-n { background: var(--accent); border-color: var(--accent); color: #fff; }
.inj-steps b { display: block; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text); }
.inj-steps small { display: block; margin-top: 2px; font-size: var(--fs-xs); line-height: 1.45; color: var(--text-2); }
.inj-steps.is-large b { font-size: var(--fs-body); }
.inj-steps.is-large small { font-size: var(--fs-sm); }
.co-next { display: grid; gap: var(--s-4); padding: var(--s-4) var(--s-5); border-radius: var(--r-lg); background: var(--accent-tint); border: 1.5px solid var(--accent-tint-2); }
.co-next-t { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-body); line-height: 1.35; color: var(--text); }
.co-next-t .inj-logo { width: 32px; height: 32px; flex: none; }
.rc-inj-lead { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md); background: var(--accent-tint); color: var(--text); font-size: var(--fs-h3); font-weight: var(--fw-semibold); line-height: 1.35; }
.rc-inj-lead .i { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--accent); }
.rc-inj-cta { justify-self: start; }
.rc-sec { padding: var(--s-5); display: grid; gap: var(--s-3); }
.rc-kv { font-size: var(--fs-sm); }
.rc-session { display: grid; gap: var(--s-4); }
.rc-when { display: grid; gap: 2px; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--bg-2); }
.rc-when b { font-size: var(--fs-body); }
.rc-when span { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.rc-when small { font-size: var(--fs-xs); color: var(--text-2); }

/* Progress: a step the plan didn't need */

/* ---------- Admin: statuses ---------- */
.st { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: var(--fw-semibold); white-space: nowrap; background: var(--bg-3); color: var(--text-2); vertical-align: middle; font-family: var(--font); letter-spacing: 0; }
.st .i { width: 12px; height: 12px; stroke-width: 2.4; }
.st-o-paid, .st-o-scheduled, .st-p-succeeded, .st-s-active { background: var(--accent-tint); color: var(--accent); }
.st-o-in_production { background: var(--accent); color: #fff; }
.st-o-completed { background: var(--bg-3); color: var(--text); }
.st-o-pending_payment, .st-p-pending, .st-s-pending { background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.st-o-cancelled, .st-p-failed, .st-p-cancelled, .st-s-cancelled, .st-s-past_due { background: var(--danger-tint); color: var(--danger); }
.st-o-refunded, .st-p-refunded, .st-p-partially_refunded { background: #FFF7E8; color: #7A4800; }
.st-i-not_started { background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.st-i-started { background: #FFF7E8; color: #7A4800; }
.st-i-completed, .st-i-verified { background: var(--accent-tint); color: var(--accent); }
.dot-new { display: inline-flex; margin-left: 6px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-size: 10px; font-weight: var(--fw-bold); letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 1px; }
.flag { display: inline-flex; margin-left: 6px; color: #9A5B00; vertical-align: -2px; }
.mono { font-family: var(--font-mono); font-size: 11.5px !important; word-break: break-all; }

/* ---------- Admin: orders and providers ---------- */
.ao-tbl { min-width: 980px; }
.ao-items { border: 1px solid var(--border); border-radius: var(--r-md); }
.ao-subs, .ao-pays { display: grid; }
.ao-sub, .ao-pays li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--border); }
.ao-sub:first-child, .ao-pays li:first-child { border-top: 0; }
.ao-sub > div:first-child, .ao-pays li > div:first-child { min-width: 0; display: grid; gap: 2px; }
.ao-sub small, .ao-pays small { font-size: var(--fs-cap); color: var(--text-2); }
.ao-sub-end { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; justify-content: flex-end; }
.ao-appt, .ao-email { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; }
.ao-appt > div:first-child, .ao-email > div:first-child { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ao-appt small, .ao-email small { font-size: var(--fs-cap); color: var(--text-2); }
.ao-acks { display: grid; gap: var(--s-2); }
.ao-acks li { display: flex; gap: var(--s-2); font-size: var(--fs-xs); }
.ao-acks .i { color: var(--accent); flex: none; margin-top: 2px; }
.ao-acks small { display: block; color: var(--text-3); font-size: var(--fs-cap); }
.ao-email-frame { width: 100%; height: min(60vh, 560px); border: 1px solid var(--border); border-radius: var(--r-md); background: #F4F6F9; }
.ao-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.ao-tiles .card-panel { padding: var(--s-4); display: grid; gap: 2px; }
.ao-tiles small { font-size: var(--fs-cap); color: var(--text-2); text-transform: uppercase; letter-spacing: var(--track-caps); font-weight: var(--fw-semibold); }
.ao-tiles b { font-size: 20px; }

@container dev (max-width: 1100px) {
  .co-summary { max-height: none; }
  .ao-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container dev (max-width: 700px) {
  .co-sec { padding: var(--s-4); }
  .co-outcomes { grid-template-columns: minmax(0, 1fr); }
  .co-due b { font-size: 24px; }
  .co-pay-wrap { display: none; } /* the sticky bar carries Pay on phones */
  .co-mcta .mcta-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rc-inj-cta { justify-self: stretch; }
  .rc-sec { padding: var(--s-4); }
  .ao-sub, .ao-pays li, .ao-appt, .ao-email { flex-wrap: wrap; }
}
