/* Claims flow (js/claimflow.js): "Where it's up to" on a claim, a remake / repair case and a credit request,
   "From claim …", and the Send RA dialog. Horizontal steps on wide screens, a vertical list on phones. */

.cflow { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.cfhead { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.cfhead .sechead { margin: 0; }
.cfkind { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--blue-tint); color: var(--blue-ink); font-size: var(--fs-13); font-weight: 700; }

/* Steps */
.cfsteps { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; }
.cfsteps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; padding: 0 4px; color: var(--muted); }
.cfsteps li::before { content: ""; position: absolute; top: 15px; left: calc(-50% + 18px); right: calc(50% + 18px); height: 3px; border-radius: 3px; background: var(--line); }
.cfsteps li:first-child::before { display: none; }
.cfsteps li.done::before, .cfsteps li.now::before, .cfsteps li.stop::before { background: var(--good); }
.cfsteps i { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--muted); font-style: normal; font-size: var(--fs-13); font-weight: 700; font-variant-numeric: tabular-nums; }
.cfsteps i .ic { width: 16px; height: 16px; }
.cfsteps li.done i { background: var(--good); border-color: var(--good); color: var(--on-accent); }
.cfsteps li.now i { background: var(--blue-btn); border-color: var(--blue-btn); color: var(--on-accent); box-shadow: 0 0 0 5px var(--blue-tint); }
.cfsteps li.stop i { background: var(--red); border-color: var(--red); color: var(--surface); }
.cfsteps span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cfsteps b { font-size: var(--fs-13); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.cfsteps small { font-size: var(--fs-12); line-height: 1.3; color: var(--muted); overflow-wrap: anywhere; }
.cfsteps li.done { color: var(--ink); }
.cfsteps li.now { color: var(--ink); }
.cfsteps li.now b { font-weight: 800; color: var(--blue-ink); }
.cfsteps li.stop b { color: var(--red); font-weight: 800; }

/* The next step: who does it, and the one main button */
.cfnext { display: flex; align-items: center; gap: 12px 14px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--surface2); border: 1px solid var(--divider); flex-wrap: wrap; }
.cfnext.ismine { background: var(--blue-tint); border-color: transparent; }
.cfnext.iswait { background: var(--tint-amber); border-color: transparent; }
.cfnext.isdone { background: var(--tint-good); border-color: transparent; }
.cfnext.isstop { background: var(--tint-red); border-color: transparent; }
.cfico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); color: var(--muted); }
.cfico .ic { width: 18px; height: 18px; }
.cfnext.ismine .cfico { background: var(--blue-btn); color: var(--on-accent); }
.cfnext.iswait .cfico { color: var(--amber); }
.cfnext.isdone .cfico { background: var(--good); color: var(--on-accent); }
.cfnext.isstop .cfico { color: var(--red); }
.cftxt { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cflab { font-size: var(--fs-12); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.cfnext.ismine .cflab { color: var(--blue-ink); }
.cfnext.iswait .cflab { color: var(--amber); }
.cftxt b { font-size: var(--fs-16); line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.cftxt small { font-size: var(--fs-13); color: var(--muted); }
.cfbtns { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.cfbtns .btn.cfgo { min-height: 44px; padding-left: 18px; padding-right: 18px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.cfbtns .btn.cfgo .ic { width: 16px; height: 16px; }

/* Forms opened from the tracker sit inside it */
.cflow > .inform, .cflow > form { margin: 0; }
.cflow .cldecide { margin-top: 0; }
.cldowhat { margin: 0; }

/* Records made from a claim */
.cfrecs { display: flex; flex-direction: column; gap: 8px; }
.cfrec { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--divider); border-radius: var(--r-ctl); background: var(--surface); }
.cfrecw { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 200px; min-width: 0; }
.cfrecw .ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.cfrecw .muted { font-size: var(--fs-13); }

/* From claim … */
.cffrom { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; border-left: 4px solid var(--blue-btn); }
.cffromh { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.cffromk { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.cffromk .ic { width: 15px; height: 15px; }
.cfref { font-weight: 800; font-size: var(--fs-16); }
.cffromc { margin: 0; display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
.cflines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cflines li { font-size: var(--fs-14); line-height: 1.4; overflow-wrap: anywhere; }
.cflines small { display: block; color: var(--muted); font-size: var(--fs-13); }
.cflno { display: inline-block; min-width: 50px; color: var(--muted); font-size: var(--fs-13); font-weight: 600; }

/* RA card: Send RA to customer, Download, Print labels */
.ratools { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.ratools .btn { display: inline-flex; align-items: center; gap: 6px; }
.ratools .btn .ic { width: 16px; height: 16px; }
.racard .rabig { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.racard .formact .btn { display: inline-flex; align-items: center; gap: 6px; }
.racard .formact .btn .ic { width: 16px; height: 16px; }

/* Send RA dialog */
.cfdlg { width: min(540px, calc(100% - 32px)); max-height: 90vh; overflow-y: auto; }
.cfdlg h2 { margin: 0 0 10px; }
.cfhow { list-style: none; margin: 0 0 14px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--surface2); display: flex; flex-direction: column; gap: 8px; }
.cfhow li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-14); }
.cfhow .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--blue-btn); }
.cfdlg .fld input { width: 100%; box-sizing: border-box; }
.cfwarn { padding: 8px 10px; border-radius: var(--r-ctl); background: var(--amber-bg); color: var(--amber); }
.cfwarn[hidden] { display: none; }
#rs-go .ic { width: 16px; height: 16px; }
#rs-go { display: inline-flex; align-items: center; gap: 6px; }

/* New email: what this email is for (Send RA) */
.mlctxnote { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--blue-tint); color: var(--blue-ink); }
.mlctxnote .ic { flex: none; width: 16px; height: 16px; margin-top: 2px; }

/* Phones: the steps go down the page */
@media (max-width: 640px) {
  .cfsteps { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cfsteps li { flex-direction: row; align-items: flex-start; text-align: left; gap: 12px; padding: 0 0 14px; }
  .cfsteps li:last-child { padding-bottom: 0; }
  .cfsteps li::before { display: none; }
  .cfsteps li::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 3px; border-radius: 3px; background: var(--line); }
  .cfsteps li:last-child::after { display: none; }
  .cfsteps li.done::after { background: var(--good); }
  .cfsteps span { padding-top: 5px; }
  .cfsteps b { font-size: var(--fs-14); }
  .cfnext { padding: 12px; }
  .cfbtns { width: 100%; }
  .cfbtns .btn.cfgo { flex: 1 1 100%; justify-content: center; }
  .ratools .btn { flex: 1 1 100%; justify-content: center; }
}

/* Claim decide form: does the product come back? */
.clret { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.clret[hidden] { display: none; }
.clret legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: var(--fs-14); }
.clret .hint { font-size: var(--fs-13); color: var(--muted); }
