/* public/tools/inventory.css
   Page-specific styles for /tools/inventory. Tokens only; anything reusable
   belongs in design-system.css first. Kept under 50 lines on purpose. */

/* A keyboard-wedge scanner types into this; it must exist and take focus
   without ever being visible or stealing layout. */
.inv-wedge { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -9999px; }

/* Locations: list on the left, the selected location's stock on the right. */
.inv-split { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: var(--s-4); align-items: start; }
@media (max-width: 900px) { .inv-split { grid-template-columns: 1fr; } }

.inv-loc-list { display: flex; flex-direction: column; }
.inv-loc-group { padding: var(--s-2) var(--s-4) var(--s-1); font-size: var(--text-xs); color: var(--ink-3); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.inv-loc-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); width: 100%; text-align: left;
  padding: var(--s-3) var(--s-4); border: 0; border-top: 1px solid var(--border-subtle); background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.inv-loc-row:hover { background: var(--surface-2); }
.inv-loc-row[aria-current="true"] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.inv-loc-row .ds-subline { display: block; }

/* Thumbnails in the catalog and drawer. */
.inv-thumb { width: 36px; height: 36px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface-2); display: block; }
.inv-thumb-lg { width: 96px; height: 96px; border-radius: var(--r-md); object-fit: cover; background: var(--surface-2); }
.inv-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, 96px); gap: var(--s-2); }
.inv-photo-grid figure { margin: 0; position: relative; }
.inv-photo-grid figcaption { position: absolute; inset: auto 0 0 0; }

/* Settings lists: one row per entity with its actions on the right. */
.inv-setting-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-top: 1px solid var(--border-subtle); }
.inv-setting-row:first-child { border-top: 0; }
.inv-setting-row .ds-cluster-sm { flex-shrink: 0; }

/* A location holding stock that nothing can reach any more: the vehicle was
   retired in Fleet, so the location went inactive underneath the stock. */
.inv-stranded { margin: 0 var(--s-4) var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--warn); border-radius: var(--r-md); background: color-mix(in srgb, var(--warn) 10%, transparent); font-size: var(--text-sm); }
.inv-stranded strong { display: block; margin-bottom: var(--s-1); }

/* The label preview inside the item drawer. */
.inv-label-preview { display: block; max-width: 100%; height: auto; border: 1px dashed var(--border); border-radius: var(--r-sm); background: #fff; }

/* Key/value list in the item drawer, and the search-as-you-type picker. */
.inv-kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-1) var(--s-4); margin: 0; font-size: var(--text-sm); }
.inv-kv dt { color: var(--ink-3); }
.inv-kv dd { margin: 0; }
.inv-suggest { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; max-height: 16rem; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-md); display: flex; flex-direction: column; }
.inv-suggest-item { display: block; width: 100%; text-align: left; padding: var(--s-2) var(--s-3); border: 0; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.inv-suggest-item:hover, .inv-suggest-item:focus { background: var(--surface-2); }
.ds-field { position: relative; }

.ds-tabular, .inv-mono { font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace); }
