/* ── Repairs job: a part's name shows in full (Neil, 12 Nov 2026) ─────────────
   components.css cut every name on the job's list to one line with "…", so
   "Shimano FC-RS500 11 speed ou…" and "Shimano CN-HG601 105 or SL…" could not
   be told apart from the next size down. A name too long for its line now
   goes onto a second one. Loaded after components.css, whose rules these
   replace. */
.parts-list-item-name {
    white-space: normal; overflow: visible; text-overflow: clip;
    overflow-wrap: anywhere; line-height: 1.3;
}
/* Wider than a phone the code and the manual link sit beside the name when
   there is room, and go under it when there isn't: the name is the last thing
   to give way. */
#rp-parts-list { container: rp-parts / inline-size; }
@media (min-width: 561px) {
    .parts-list-item-info { flex-wrap: wrap; row-gap: 0.1rem; }
    .parts-list-item-name { flex: 1 1 auto; max-width: 100%; }
    .parts-list-item-info > .parts-list-item-meta { max-width: 100%; }
    /* A narrow list (a tablet on its side, where Work is one of two columns):
       a part's name and code take the whole first line, and its status, price
       and buttons go under them, to the right, rather than squeeze the name
       to a word a line. A job or labour line has no status and stays one line. */
    @container rp-parts (max-width: 620px) {
        .parts-list-item:has(> .parts-status-pill) > .parts-list-item-info { flex-basis: 100%; }
        .parts-list-item:has(> .parts-status-pill) > .parts-status-pill { margin-left: auto; }
        .parts-list-item:has(> .parts-status-pill) > .parts-list-item-actions { margin-left: 0; }
    }
}
/* Phone: a part with a status pill but no - and + (Ordered, Received) keeps the
   line break under its name, so the pill and the buttons go below it. Without
   the break the 151px pill, price and X shared the name's line and left a long
   name 16px wide (#3980). */
@media (max-width: 560px) {
    .parts-list-item:has(> .parts-status-pill):not(:has(.parts-qty-step))::after { display: block; }
    .parts-list-item:has(> .parts-status-pill):not(:has(.parts-qty-step)) .parts-list-item-actions { order: 3; }
}
/* Phone: a job or labour line has no status pill, but "Priced by labour",
   "Add labour" or "No price" sits where the price does, and on a 320px phone
   left the name 54px wide. That note and the ✕ go under the name, to the
   right, like a part's pill line (#3985). A priced job stays on one line. */
@media (max-width: 560px) {
    .parts-list-item--job:has(.parts-no-price, .parts-addlabour-btn) > .parts-list-item-info { flex-basis: 100%; }
    .parts-list-item--job:has(.parts-no-price, .parts-addlabour-btn) > .parts-list-item-price { margin-left: auto; }
}
