/* The parts list import (js/desk/parts-import.js): the page is built like the fleet list import (desk-pages.css:
   .uni-src, .ucols, .uni-impfoot, .uni-done); these are its own pieces, and its link on the phone's Parts page. */
.cp-impfoot { display: none; }

.pim-table .c-dr { width: 56px; }
.pim-table td.dr img { width: 40px; height: 40px; display: block; }
.pim-table .c-lc { width: 150px; }
.pim-table .c-oh { width: 120px; }
.pim-table .c-mx { width: 104px; }
.pim-table .c-pr { width: 96px; }
.pim-table .c-st { width: 300px; }
.pim-table td.pt .pn { display: block; font-size: 15.5px; font-weight: 700; }
.pim-table td.pt .mono { display: block; font-weight: 600; font-size: 14px; }
.pim-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pim-table td.oh b { font-size: 15px; }
.pim-table td.sc .rv-sub { overflow-wrap: anywhere; }
.pim-table tr.st-unchanged td, .pim-table tr.st-skipped td { color: var(--soft); }
.pim-table tr.st-skipped td.dr img { opacity: 0.45; }
.pim-table td.ch { display: none; }      /* the phone's last line: what changes */
.pim-lost { display: flex; align-items: center; gap: 4px; white-space: normal; }

.pim-sheet { display: inline-flex; align-items: center; gap: 8px; }
.pim-sheet .flbl { margin: 0; }
.pim-sheet .pin { height: 40px; min-width: 160px; font-size: 14.5px; }
.pim-old { max-width: 980px; }

/* "Use the file's on-hand counts" */
.pim-countsbox { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); background: var(--paper); max-width: 980px; }
.pim-ck { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.35; cursor: pointer; }
.pim-ck input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--ink); }
.pim-countsbox .dp-hint { margin: 6px 0 0 32px; }

.pim-warns { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 980px; }
.pim-warns li { display: flex; align-items: flex-start; gap: 8px; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
.pim-warns li svg { flex: none; margin-top: 3px; }

/* a narrow desk: the min / max column goes (it is in the columns above) */
@media (min-width: 1024px) and (max-width: 1199.98px) {
  .pim-table .c-mx, .pim-table td.mx { display: none; }
  .pim-table .c-lc { width: 100px; }
  .pim-table .c-oh { width: 92px; }
  .pim-table .c-pr { width: 84px; }
  .pim-table .c-st { width: 200px; }
  .pim-table td.lc { white-space: normal; }
}

/* compact: phone layout. The top bar has the title; each row is a card: the picture at the left, the part and its tag
   on top, then the bin, the on-hand and the price, then what changes. */
@media (max-width: 1023.98px) {
  .dpim .dp-head .dtitle { display: none; }
  /* the phone's Parts page: "Import parts list" after the parts (its header has no room for a third button, and the
     first parts stay high on the screen); the empty page has its own big IMPORT PARTS LIST */
  .cp-impfoot { display: flex; justify-content: center; padding: 20px 16px 8px; margin: 0; }
  .cp-impfoot .dbtn { min-height: 48px; width: 100%; max-width: 360px; justify-content: center; }
  #p-empty:not([hidden]) ~ .cp-impfoot { display: none; }
  .pim-sheet { flex-basis: 100%; }
  .pim-sheet .pin { flex: 1; height: 48px; font-size: 16px; }
  .pim-countsbox { padding: 12px; }
  .pim-ck { font-size: 16px; min-height: 48px; align-items: center; }
  .pim-ck input { width: 26px; height: 26px; }
  .pim-countsbox .dp-hint { margin-left: 36px; }
  .pim-warns li { font-size: 15px; }
  .pim-table tr { grid-template-columns: 44px minmax(0, 1fr) auto auto; grid-template-areas: "dr pt pt sc" "dr lc pr oh" "dr ch ch ch"; column-gap: 10px; row-gap: 6px; padding: 12px 0 12px 4px; }
  .pim-table td.dr { grid-area: dr; align-self: start; }
  .pim-table td.dr img { width: 44px; height: 44px; }
  .pim-table td.pt { grid-area: pt; }
  .pim-table td.pt .pn { font-size: 16px; }
  .pim-table td.sc { grid-area: sc; align-self: start; text-align: right; }
  .pim-table td.sc .rv-sub { display: none; }       /* the change words are on the card's last line (td.ch) */
  .pim-table td.lc { grid-area: lc; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
  .pim-table td.pr { grid-area: pr; align-self: center; font-size: 15px; color: var(--soft); }
  .pim-table td.oh { grid-area: oh; text-align: right; align-self: center; }
  .pim-table td.oh:not(:empty)::before { content: 'On hand '; font-size: 14px; color: var(--g1); }
  .pim-table td.oh .rv-sub { display: inline; margin-left: 6px; }
  .pim-table td.mx { display: none; }
  .pim-table td.ch { display: block; grid-area: ch; font-size: 14px; line-height: 1.35; color: var(--g1); }
}
