/* HWP-PLAN-UNITS-001 - route board presentation. Additive: only classes that start with hwp-bp-.
   Meaning is never carried by colour alone: every badge is icon + text; the two oranges also differ in border style,
   icon and wording. Text is dark on a light tint; tests/board-presentation.test.mjs computes the WCAG contrast of every
   colour / background pair below and requires at least 4.5:1 (measured values are in the comment of each rule). */

.hwp-bp-badges { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.hwp-bp-icon { flex:none; }

.hwp-bp-kind,
.hwp-bp-late,
.hwp-bp-unit { display:inline-flex; align-items:center; gap:5px; padding:2px 8px; min-height:24px; border-radius:6px; border:1px solid transparent; border-left-width:4px; font-size:12px; font-weight:600; line-height:1.3; }

/* green = delivery (8.5:1) */
.hwp-bp-kind--delivery { color:#1B4D31; background:#E3F4E8; border-color:#2E7D4F; }
/* blue = collection (9.0:1) */
.hwp-bp-kind--collection { color:#173F70; background:#E3EEFB; border-color:#1F5FA8; }
/* orange = urgent breakdown (7.9:1) */
.hwp-bp-kind--breakdown { color:#7A2A05; background:#FFE2CC; border-color:#C2410C; }
/* light orange = special out-of-turn delivery: lighter tint, DASHED edge, its own icon and wording (8.0:1) */
.hwp-bp-kind--special { color:#6B4200; background:#FFF4E0; border-color:#B26A00; border-style:dashed; border-left-style:dashed; }
/* yellow = charging (8.4:1) */
.hwp-bp-kind--charging { color:#5C4500; background:#FFF7C2; border-color:#8A6A00; }
/* supplier rides and transfers (11.2:1) */
.hwp-bp-kind--neutral { color:#24353E; background:#EEF1F1; border-color:#68747A; }

/* late: amber chip (7.7:1); a collection more than seven days late: red chip with the word "Achterstallig" (8.7:1) */
.hwp-bp-late { color:#6B4200; background:#FFEFCF; border-color:#B26A00; }
.hwp-bp-late--overdue { color:#7A1B14; background:#FBE4E1; border-color:#A9261D; }

/* unit states: 99 = no machine chosen yet (11.2:1), 98 = hired, serial unknown (10.3:1); code badge white on ink (12.7:1) */
.hwp-bp-unit { border-left-width:1px; font-weight:500; }
.hwp-bp-unit--unassigned { color:#24353E; background:#EEF1F1; border-color:#68747A; border-style:dashed; }
.hwp-bp-unit--external { color:#3D2A66; background:#EFE9FA; border-color:#6B4FA8; border-style:dashed; }
.hwp-bp-unit-code { font-variant-numeric:tabular-nums; font-weight:700; padding:0 5px; border-radius:4px; background:#24353E; color:#FFFFFF; }

/* the list item keeps its own look; a coloured edge repeats the kind for a quick scan */
.lo-board-item.hwp-bp-item--delivery { box-shadow:inset 4px 0 0 #2E7D4F; }
.lo-board-item.hwp-bp-item--collection { box-shadow:inset 4px 0 0 #1F5FA8; }
.lo-board-item.hwp-bp-item--breakdown { box-shadow:inset 4px 0 0 #C2410C; }
.lo-board-item.hwp-bp-item--special { box-shadow:inset 4px 0 0 #B26A00; }
.lo-board-item.hwp-bp-item--charging { box-shadow:inset 4px 0 0 #8A6A00; }
.lo-board-item.hwp-bp-backlog-item.is-overdue { box-shadow:inset 4px 0 0 #A9261D; }

.hwp-bp-legend { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:0 0 4px; font-size:12px; }
.hwp-bp-legend-title { font-weight:600; margin-right:2px; }

@media (max-width: 480px) {
  .hwp-bp-kind, .hwp-bp-late, .hwp-bp-unit { font-size:12px; white-space:normal; }
}
@media (forced-colors: active) {
  .hwp-bp-kind, .hwp-bp-late, .hwp-bp-unit { border-color:CanvasText; }
}

/* Selection remains distinct from the job kind stripe. */
.lo-board-item.is-selected[class*="hwp-bp-item--"] { box-shadow:inset 3px 0 0 var(--brand); outline:2px solid var(--brand); outline-offset:1px; }
