/* HWP-PLAN-UNITS-001 - warehouse screen "Machines kiezen". Additive: only classes that start with lu-.
   Built for a phone or tablet in the yard: one column, touch targets of at least 44px, no horizontal scrolling at 320px.
   State is always text (with a code badge where it applies); colour only supports it.
   Colours: the page follows the app's own theme tokens (css/planboard.css, light and dark), so it looks like the rest of
   the field frame in both themes; each fallback is the light value of its token. The primary buttons are the app's own
   .pb-btn--ink. The state chips (99 / 98 / machine) carry their own text and background and are the same in both
   themes, like the chips on the route board.
   tests/loods-units.test.mjs computes every text / background combination below for both themes (minimum 4.5:1);
   tests/browser/loods-robust.browser.cjs measures the same in the real page, in both themes. */

.lu-page { max-width:760px; margin:0 auto; color:var(--text-primary,#24353E); overflow-wrap:anywhere; }
.lu-title { margin:0; font-size:20px; line-height:1.25; color:var(--text-primary,#24353E); }
.lu-sub { margin:4px 0 0; font-size:14px; color:var(--text-muted,#5A6B74); }
.lu-status { min-height:1.4em; margin:8px 0; font-weight:600; color:var(--text-primary,#24353E); }
.lu-status:focus { outline:none; }
.lu-status:focus-visible:not(:empty) { outline:3px solid var(--text-primary,#24353E); outline-offset:3px; border-radius:4px; }
.lu-muted { color:var(--text-muted,#5A6B74); }
.lu-line { margin:4px 0 0; font-size:14px; line-height:1.4; }

.lu-toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:space-between; margin:8px 0; }
.lu-filters { display:flex; flex-wrap:wrap; gap:8px; }
/* the app's .pb-btn is 38px high on one line; here every button is a touch target and may wrap */
.lu-btn { height:auto; min-height:44px; padding:8px 14px; font-size:15px; white-space:normal; text-align:center; }
.lu-btn:focus-visible { outline:3px solid var(--text-primary,#24353E); outline-offset:2px; }
.lu-btn[aria-pressed="true"], .lu-btn[aria-pressed="true"]:hover { background:var(--text-primary,#24353E); border-color:var(--text-primary,#24353E); color:var(--surface,#FFFFFF); }
.lu-btn[disabled] { opacity:.55; cursor:not-allowed; }
.lu-counts { margin:0 0 8px; font-size:13px; color:var(--text-muted,#5A6B74); }
/* a command is under way: the list is dimmed and cannot be tapped until the outcome is shown */
#lu-root.is-busy { opacity:.55; pointer-events:none; }

.lu-group { margin-top:18px; }
.lu-group > h2 { font-size:16px; margin:0 0 8px; }
.lu-group.is-overdue > h2 { color:var(--danger-fg,#A33F33); }
.lu-cards, .lu-candidate-list { list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.lu-card, .lu-candidate { border:1px solid var(--border-strong,#D3DBDF); border-radius:10px; background:var(--surface,#FFFFFF); padding:12px 14px; }
.lu-card h3 { margin:0; font-size:16px; }
.lu-card.is-overdue { border-left:5px solid var(--danger-fg,#A33F33); }
.lu-late { color:var(--danger-fg,#A33F33); }
.lu-shortage { color:var(--warning-fg,#7A4E06); background:var(--warning-bg,#F8EEDA); border-radius:6px; padding:6px 8px; }
.lu-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }

.lu-state { display:inline-flex; align-items:center; gap:6px; padding:3px 8px; border-radius:6px; border:1px solid transparent; font-size:13px; font-weight:600; }
.lu-state--unassigned { color:#24353E; background:#EEF1F1; border-color:#68747A; border-style:dashed; }
.lu-state--external { color:#3D2A66; background:#EFE9FA; border-color:#6B4FA8; border-style:dashed; }
.lu-state--known { color:#1B4D31; background:#E3F4E8; border-color:#2E7D4F; }
.lu-code { font-variant-numeric:tabular-nums; padding:0 6px; border-radius:4px; background:#24353E; color:#FFFFFF; }

.lu-candidates > h2 { font-size:18px; margin:10px 0 0; }
.lu-candidate { display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.lu-candidate > div { min-width:0; flex:1 1 220px; }
.lu-candidate.is-disabled { background:var(--surface-muted,#E9EEEF); }
.lu-candidate.is-current { border-color:var(--success-fg,#256B49); }
.lu-check { color:var(--text-primary,#24353E); }
.lu-check--geblokkeerd, .lu-check--keuring_ongeldig { color:var(--danger-fg,#A33F33); }
.lu-reason { color:var(--danger-fg,#A33F33); }

.lu-notice { margin:10px 0; padding:10px 12px; border:1px solid var(--border-strong,#D3DBDF); border-left-width:5px; border-radius:8px; background:var(--surface,#FFFFFF); color:var(--text-primary,#24353E); }
.lu-pending { border-color:var(--warning-fg,#7A4E06); }

@media (max-width: 420px) {
  .lu-toolbar { align-items:stretch; }
  .lu-actions .lu-btn, .lu-candidate .lu-btn { flex:1 1 100%; }
}
@media (forced-colors: active) {
  .lu-state, .lu-card, .lu-candidate, .lu-notice { border-color:CanvasText; }
}

.lu-preparation { margin-top:10px; padding-top:8px; border-top:1px solid var(--border-strong,#D3DBDF); }
.lu-preparation .lu-btn, .lu-notice .lu-btn { display:inline-flex; align-items:center; margin-top:8px; text-decoration:none; }
.lu-accessories { margin:16px 0; }
.lu-accessories h2 { font-size:16px; }
