/* claimflow: File a claim (DIRECTION-v6.md section 3). The split window, the dark panel's frame, choice cards, fields, the foot
   and the checkbox come from flow.css and styles.css; this file adds what the claim flow has of its own: the two-line choice
   cards, the details' groups, the drop zone and the thumbnails with their upload, Check and send's summary, the live panel's
   rows, the calm sent page, and the Claims page's draft row. No font-size inside a query; colors only as tokens. The motion
   tokens (--dur-*, --ease-*) are motion.css's; each use carries its value as a fallback. */

:root {
  --cf-thumb: 96px;                             /* a file's thumbnail on wide screens; three to a row on phones */
  --cf-thumb-edge: rgba(0, 0, 0, 0.06);         /* a hairline inside a photo, so a white photo keeps its shape */
  --cf-veil: 0.5;                               /* a photo still uploading sits under a white veil */
  --cf-bar-track: rgba(255, 255, 255, 0.92);    /* the upload bar's track, on a photo */
  --cf-tile-dark: rgba(255, 255, 255, 0.08);    /* an icon tile on the dark panel */
  --cf-fade: var(--dur-3, 280ms) var(--ease-out, cubic-bezier(0.2, 0.8, 0.2, 1));
  --cf-choice-h: 72px;                          /* a choice card with a title and a line */
  --cf-sk-w: 88px;                              /* a value still to come, in the dark panel */
  --cf-sent-max: 720px;                         /* the sent page reads as one calm column */
  --cf-toast-top: 84px;                         /* a toast in the split window: under its header row (40 down, 32 high) and 12 of air */
  --cf-box-gap: 20px;                           /* the claim boxes' tile-to-title gap (claims.css), so the draft row lines up with them */
  --cf-mark-pad: 6px;                           /* the white disc around a failed file's alert mark */
}

/* =================================================================
   Step 1: choice cards with a title and a line (the version 3 card: icon left, nothing on the right)
   ================================================================= */
.cf-choice { min-height: var(--cf-choice-h); padding-block: var(--s-3); }
.cf-choice .t { display: grid; gap: 2px; min-width: 0; }
.cf-ct { line-height: var(--lh-ui); }
.cf-cl { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); font-weight: 400; }   /* stays Regular when the card is chosen */
.cf-narrow { margin-top: var(--s-4); color: var(--ink-2); }
.cf-narrow .link { display: inline; }
/* The note under the question when an entry picked up a saved claim, or replaced one: the info box's quiet gray, one line
   with its action at the end (Start a new one, or Undo). It stays while she's on the step */
.cf-kept { display: flex; align-items: flex-start; gap: var(--s-2); max-width: var(--flow-max); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--sunk); line-height: var(--lh-ui); }
.cf-kept > svg.i { flex: none; width: 16px; height: 16px; margin-top: 4px; color: var(--ink); }
.cf-kept .link { display: inline; }
.flow-body > .cf-kept + * { margin-top: var(--s-6); }
.flow-body > .lead + .cf-kept { margin-top: var(--s-5); }

/* =================================================================
   Step 2: groups 32 apart; a group's question Bold, its fields' own labels Regular under it
   ================================================================= */
.cf-q + .cf-q { margin-top: var(--s-6); }
.cf-q.cf-q-tight { margin-top: var(--s-4); }      /* the client's contact, right under their name */
.cf-q > legend { font-weight: 700; line-height: var(--lh-ui); margin-bottom: var(--s-3); }
.cf-dt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: repeat(4, auto); gap: var(--s-2) var(--s-4); align-items: start; }
.cf-dt > .field { grid-row: span 4; grid-template-rows: subgrid; }   /* label, field, hint, error: the two fields' rows line up */
.cf-dt .field label, .cf-reveal label { font-weight: 400; }
.cf-reveal { margin-top: var(--s-4); }
.cf-reveal.cf-date { max-width: calc(50% - var(--s-2)); }   /* a date is as wide as the one beside the time */
.cf-hint { display: block; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.cf-hint a svg.i { display: inline; width: 16px; height: 16px; margin-left: 2px; vertical-align: -3px; }
.cf-opt { font-weight: 400; color: var(--ink-2); }
.choices.cf-row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cf-note { display: flex; align-items: flex-start; gap: var(--s-2); margin-top: var(--s-3); font-size: var(--fs-small); line-height: var(--lh-small); }
.cf-note svg.i { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.cf-note b { font-weight: 700; }
.cf-note-m { display: none; }                     /* the lost income, beside the answer, where the panel is out of view */
@media (max-width: 1023px) { .cf-note-m { display: flex; } }
@media (max-width: 639px) { .choices.cf-row3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 479px) {
  .cf-dt { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: var(--s-4); }
  .cf-dt > .field { grid-row: auto; grid-template-rows: none; }
  .cf-reveal.cf-date { max-width: none; }
}

/* =================================================================
   Step 3: the drop zone (the dashed "you don't have it yet" edge), then the files
   ================================================================= */
.cf-drop { position: relative; display: grid; justify-items: center; gap: var(--s-4); padding: var(--s-7) var(--s-6); border: 1px dashed var(--field); border-radius: var(--r-lg); background: var(--canvas); text-align: center;
  transition: border-color var(--t-hover), background-color var(--t-hover), box-shadow var(--t-hover); }
.cf-drop.drag { border-color: var(--green); }                                                                  /* files over the window */
.cf-drop.over { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: var(--wash); }  /* over the zone itself */
.cf-dz { min-width: 0; }
.cf-dz-t { font-weight: 700; line-height: var(--lh-ui); }
.cf-dz .cf-hint { margin-top: 2px; }
.cf-dz-b { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); }
.cf-pick { display: contents; }
.cf-cam, .cf-touch { display: none; }
@media (hover: none) { .cf-cam { display: contents; } .cf-touch { display: inline; } .cf-fine { display: none; } }   /* a phone: the camera first, and no talk of dragging */
.cf-dz-b label.btn { cursor: pointer; }
.cf-dz-b input:focus-visible + label { outline: var(--v8-focus); outline-offset: 0; box-shadow: var(--v8-focus-glow); }
/* With files in, the zone steps back to one row, so the thumbnails lead */
.cf-drop.compact { grid-template-columns: 40px minmax(0, 1fr) auto; justify-items: stretch; align-items: center; padding: var(--s-4) var(--s-5); text-align: left; }
.cf-drop.compact .cf-dz-b { justify-content: flex-end; }
.cf-zone { container-type: inline-size; }
.cf-zone + .err { margin-top: var(--s-3); }
/* A narrow column (a laptop's split window): the zone's button goes under its words */
@container (max-width: 459px) {
  .cf-drop.compact { grid-template-columns: 40px minmax(0, 1fr); }
  .cf-drop.compact .cf-dz-b { grid-column: 2; justify-content: flex-start; }
}
.cf-sample { display: flex; width: fit-content; margin-top: var(--s-4); }
@media (max-width: 639px) {
  .cf-drop { padding: var(--s-6) var(--s-4); }
  .cf-dz-b { flex-direction: column; align-self: stretch; width: 100%; }
  .cf-dz-b .btn { width: 100%; }
  .cf-drop.compact { padding: var(--s-4); }
  .cf-drop.compact .cf-dz-b { grid-column: 1 / -1; }
}

/* The files: a grid of 96 thumbnails (three to a row on phones), the name under each on one line, its size under that. While
   one uploads, a white veil and a bar at its foot; then both fade, and the line reads its size */
.cf-files { display: grid; grid-template-columns: repeat(auto-fill, var(--cf-thumb)); gap: var(--s-5) var(--s-4); margin-top: var(--s-5); }
.cf-file { position: relative; display: grid; align-content: start; min-width: 0; }
.cf-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; background: var(--g-10); color: var(--green-strong); }
.cf-thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--cf-thumb-edge); pointer-events: none; }
.cf-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cf-thumb > svg.i { width: 28px; height: 28px; stroke-width: 1.25; }
.cf-veil { position: absolute; inset: 0; background: var(--canvas); opacity: 0; transition: opacity var(--dur-3, 280ms) var(--ease-out, ease-out); }
.cf-bar { position: absolute; left: var(--s-2); right: var(--s-2); bottom: var(--s-2); height: 4px; border-radius: 2px; background: var(--cf-bar-track); overflow: hidden; opacity: 0; transition: opacity var(--dur-2, 200ms) var(--ease-out, ease-out) 120ms; }
.cf-bar > i { display: block; height: 100%; background: var(--green); transform: scaleX(1); transform-origin: left center; }
.cf-file.is-up .cf-veil { opacity: var(--cf-veil); }
.cf-file.is-up .cf-bar { opacity: 1; transition-delay: 0ms; }
.cf-file.is-up .cf-bar > i { transform: scaleX(0); }
.cf-fn, .cf-fm { font-size: var(--fs-small); line-height: var(--lh-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-fn { margin-top: var(--s-2); }
.cf-fm { color: var(--ink-2); }
.cf-x { position: absolute; top: var(--s-1); right: var(--s-1); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--canvas); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2); transition: background-color var(--t-hover); }
.cf-x:hover { background: var(--hover); }
.cf-x:active { background: var(--pressed); }
.cf-x svg.i { width: 16px; height: 16px; }
/* Its focus ring sits on the photo, so white runs between the photo and the green (a dark photo would swallow the ring alone) */
.cf-x:focus-visible { outline: var(--v8-focus); outline-offset: 0; box-shadow: var(--v8-focus-glow); }
/* A file that didn't upload: the photo under the veil with an alert mark on it, "Didn't upload" in ink under the name (the
   words carry it, never the color), Try again under them */
.cf-file.is-failed .cf-veil { opacity: var(--cf-veil); }
.cf-fail-i { position: absolute; inset: 0; display: grid; place-items: center; }
.cf-fail-i svg.i { box-sizing: content-box; width: 20px; height: 20px; padding: var(--cf-mark-pad); border-radius: 50%; background: var(--canvas); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2); }
.cf-file.is-failed .cf-fm { color: var(--ink); }
.cf-reup { justify-self: start; }
@media (hover: none) { .cf-x { width: 32px; height: 32px; } }   /* a finger's target on a phone */
.cf-later { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.flow-foot .cf-later-d { flex: 1 0 100%; }
.cf-later-m { display: none; margin-top: var(--s-5); }
@media (max-width: 639px) {
  .cf-files { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4) var(--s-3); }
  .flow-foot .cf-later-d { display: none; }   /* the sticky foot stays two buttons; the line sits at the end of the question instead */
  .cf-later-m { display: block; }
}

/* =================================================================
   Step 4: Check and send
   ================================================================= */
.cf-block + .cf-block { margin-top: var(--s-7); }
.cf-block > h2 + * { margin-top: var(--s-4); }
.cf-sum { padding: 0 var(--pad-tile); container-type: inline-size; }
.cf-row { display: grid; grid-template-columns: minmax(0, 10.5em) minmax(0, 1fr) auto; gap: var(--s-1) var(--s-4); align-items: baseline; padding: var(--s-4) 0; }
.cf-row + .cf-row { border-top: 1px solid var(--line); }
.cf-row dt { color: var(--ink-2); }
.cf-row .cf-v { min-width: 0; overflow-wrap: anywhere; }
.cf-row .cf-chg { justify-self: end; }
@container (max-width: 459px) {
  .cf-row { grid-template-columns: minmax(0, 1fr) auto; }
  .cf-row .cf-v { grid-column: 1 / -1; grid-row: 2; }
}
.cf-mini { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.cf-mt { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); overflow: hidden; background: var(--g-10); color: var(--green-strong); font-size: var(--fs-small); line-height: var(--lh-small); }
.cf-mt img { width: 100%; height: 100%; object-fit: cover; }
.cf-mt svg.i { width: 18px; height: 18px; }
.cf-mt.more { background: var(--fill); color: var(--ink); }
.cf-pays { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-4); align-items: start; padding: var(--pad-tile); }
.cf-pt { min-width: 0; padding-top: 9px; }        /* the name's first line centers on the 40 tile */
.cf-pays .t { font-weight: 700; line-height: var(--lh-ui); }
.cf-pays .s { margin-top: 2px; color: var(--ink-2); }
.cf-pli { display: flex; align-items: flex-start; gap: var(--s-2); margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.cf-pli svg.i { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.cf-pli b { font-weight: 700; }
.cf-bad { display: flex; align-items: flex-start; gap: var(--s-2); margin-top: var(--s-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.cf-bad svg.i { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.cf-acct { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-5); flex-wrap: wrap; }
.cf-acct .cf-hint { margin-top: 2px; }
.cf-agree { margin-top: var(--s-5); }
.cf-failbox { margin-top: var(--s-2); }

/* =================================================================
   The dark panel: rows that fill in, the policy that pays, what happens next
   ================================================================= */
.cf-live { flex: 1; display: flex; flex-direction: column; }
.cf-rows { margin-top: var(--s-6); border-top: 1px solid var(--inverse-line); }
.cf-pr { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 2px var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--inverse-line); }
.cf-pr dt { color: var(--inverse-ink-2); }
.cf-pr dd { min-width: 0; overflow-wrap: anywhere; }
.cf-sk { display: inline-block; width: var(--cf-sk-w); height: 8px; border-radius: 4px; background: var(--inverse-line); vertical-align: middle; }   /* still to come */
.cf-live h3 { font-size: var(--fs-body); line-height: var(--lh-ui); font-weight: 700; }
.cf-ps, .cf-nx { margin-top: var(--s-6); }
.cf-wait { margin-top: var(--s-2); color: var(--inverse-ink-2); }
.cf-pol { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-4); align-items: start; margin-top: var(--s-3); }
.cf-live .it { background: var(--cf-tile-dark); color: var(--green-line); }
.cf-pn { line-height: var(--lh-ui); }
.cf-pd { margin-top: 2px; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--inverse-ink-2); }
/* Lost income, when the salon is closed: the verdict as an icon and a word, the reason under it */
.cf-li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-4); align-items: start; margin-top: var(--s-4); }
.cf-li > svg.i { justify-self: center; margin-top: 1px; color: var(--inverse-ink); }
.cf-li[data-v="yes"] > svg.i { color: var(--green-line); }
.cf-lt { line-height: var(--lh-ui); }
.cf-lt b { font-weight: 700; }
.cf-ld { margin-top: 2px; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--inverse-ink-2); }
.cf-nx ul { display: grid; gap: var(--s-3); margin-top: var(--s-3); }
.cf-nx.cf-nx-only ul { margin-top: 0; }
.cf-nx li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: var(--s-3); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--inverse-ink-2); }
.cf-nx li svg.i { width: 16px; height: 16px; margin-top: 2px; stroke-width: 1.5; }
@container (max-width: 399px) { .cf-pr { grid-template-columns: minmax(0, 1fr); } }   /* the name over its value, the same size */
/* A value arriving fades in (from nothing, or a choice that changed) */
.cf-in { animation: cf-in var(--cf-fade) both; }
@keyframes cf-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes cf-fade { from { opacity: 0; } }

/* =================================================================
   Sent: the calm confirmation, in the shell. A check, a name, a date; no celebration
   ================================================================= */
.cf-sent { max-width: var(--cf-sent-max); }
.cf-hero { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 var(--s-5); align-items: start; }
.cf-hx { min-width: 0; padding-top: 6px; }       /* the Lead's first line (28) centers on the 40 tile */
.cf-hero h2 { font-size: var(--fs-lead); line-height: var(--lh-lead); font-weight: 400; text-wrap: pretty; }
.cf-hero .t2 { color: var(--ink-2); }
.cf-ok svg.i { width: 20px; height: 20px; stroke-width: 2; }
/* Claim progress: the claim page's stepper on its blue card (components.css, .cl-prog and .clp-st) */
.cf-prog-s, .cf-next-s { margin-top: var(--s-7); }
.cf-steps { margin-top: var(--s-3); }
.cf-msg { color: var(--ink); }
.cf-msg svg.i { width: 20px; height: 20px; }
.cf-sent-acts { display: flex; margin-top: var(--s-6); }
.cf-more { margin-top: var(--s-4); color: var(--ink-2); }
@media (max-width: 639px) {
  .cf-hero { column-gap: var(--s-4); }
  .cf-sent-acts .btn { width: 100%; }
}
/* On arrival motion.js draws the check (data-mo-draw="enter"): no celebration */

/* =================================================================
   The Claims page's saved draft (claims.js places cfDraftRow() before the open claims)
   ================================================================= */
.cf-draft { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: var(--s-3) var(--cf-box-gap); }   /* .box's padding and .claim-box's gap */
.cf-dr-t { min-width: 0; }
.cf-dr-t .t { font-weight: 700; line-height: var(--lh-ui); }
.cf-dr-t .s { margin-top: 2px; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.cf-dr-a { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2) var(--s-5); }
@media (max-width: 767px) { .cf-draft { grid-template-columns: 40px minmax(0, 1fr); } .cf-dr-a { grid-column: 2; justify-content: flex-start; } }
@media (max-width: 639px) { .cf-draft { column-gap: var(--s-4); } }
.toast .cf-undo { display: inline; margin-left: var(--s-2); font-weight: 400; }
/* In the split window (1024 and wider) a toast (the Undo after removing a file) sits under the header row, over the question
   column and lined up with it, clear of the progress and Close. Under 1024 it keeps its place under the header (styles.css) */
@media (min-width: 1024px) {
  html:has(#panel .cf-live) .toast { top: var(--cf-toast-top); left: var(--flow-x); max-width: min(var(--flow-max), calc(100vw - var(--live-w) - 2 * var(--flow-x))); transform: translateY(-8px); }
  html:has(#panel .cf-live) .toast.on { transform: none; }
}

/* =================================================================
   Motion off (html.mo-still: reduced motion, or the switcher's "Motion: off", where styles.css also stops every CSS transition):
   a value arrives with a quick fade and doesn't move. The upload bar still fills (motion.js-free, frame by frame): it's feedback
   ================================================================= */
@media (prefers-reduced-motion: reduce) { .cf-live .cf-in { animation: cf-fade var(--dur-2, 200ms) linear both !important; } }
html[data-motion="off"] .cf-live .cf-in, html.mo-still .cf-live .cf-in { animation: cf-fade var(--dur-2, 200ms) linear both !important; }

/* =================================================================
   Forced colors (Windows High Contrast): box-shadow edges and fills are dropped, so the flow's own controls draw a border
   ================================================================= */
@media (forced-colors: active) {
  .cf-x { border: 1px solid ButtonText; }
  .cf-x:focus-visible { outline: 2px solid Highlight; }
  .cf-kept { border: 1px solid CanvasText; }
  .cf-drop.over { border-style: solid; }
  .cf-bar { border: 1px solid CanvasText; }
  .cf-bar > i { background: Highlight; forced-color-adjust: none; }
}
