/* PrairieOps — parts-editor.css
   Restyled Service-task parts (and, in C2, fluids) "needed" editor. Clean lines
   + colored status pill. The status pill is a <select> (editable, keeps 1-tap
   status change). Source/vendor lives in the future Parts module, not here. */

.pe-list { }
.pe-line {
  border: 1px solid var(--border-subtle); border-radius: 8px;
  padding: 8px 10px; margin-bottom: 6px; background: var(--bg-elevated);
}
.pe-line-cancelled { opacity: .55; }
/* Compact one-line summary; "⋯" expands the detail block (Option B). */
.pe-line-row { display: flex; align-items: center; gap: 8px; }
.pe-line-name { font-weight: 600; font-size: 13px; color: var(--text-primary); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-line-qty { font-size: 12px; color: var(--text-secondary); flex: 0 0 auto; }
.pe-more { flex: 0 0 auto; background: none; border: none; color: var(--text-muted); font-size: 17px; line-height: 1; padding: 0 4px; cursor: pointer; }
.pe-line-det { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-subtle); }
.pe-line-meta { display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: 12px; color: var(--text-secondary); }
.pe-line-meta b { color: var(--text-primary); font-weight: 600; }
.pe-line-actions { display: flex; gap: 6px; margin-top: 8px; }
.pe-empty { font-size: 13px; color: var(--text-muted); padding: 4px 0 8px; }
.pe-addhd { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin: 4px 0 8px; }

/* Add row: heading on the left, Parts/Fluids swap toggle on the right
   (same solid-gold Option-C control as Log Service). */
.pe-addrow { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 8px; }
.pe-addrow .pe-addhd { margin: 0; }
.pe-seg { display: inline-flex; gap: 2px; padding: 2px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 999px; }
.pe-seg-btn { background: none; border: none; color: var(--text-muted); font-size: 12px; font-weight: 600; font-family: inherit; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.pe-seg-btn.on { background: var(--brand, #c49060); color: #1a1205; }
.pe-seg-ct { font-size: 10px; opacity: .6; font-weight: 700; margin-left: 5px; }
.pe-seg-btn.on .pe-seg-ct { opacity: .85; }

/* Inline Add row: Qty (parts) or Amount+Unit (fluids) beside a solid-gold
   Add/Save button. The bottom modal action is "Save" (close). */
.pe-addline { display: flex; gap: 8px; align-items: flex-end; margin-top: 2px; }
.pe-addline .form-group { margin-bottom: 0; }
.pe-add-item {
  flex: 1 1 auto; min-height: 40px;
  background: var(--brand, #c49060); border: 1px solid var(--brand, #c49060); color: #1a1205;
  border-radius: 6px; padding: 9px 14px; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer;
}
.pe-add-item:active { transform: scale(0.99); }

/* Status as a colored pill-select (editable). */
.pe-status {
  flex: 0 0 auto; width: auto; border: 1px solid; border-radius: 999px;
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  background: var(--bg-elevated); cursor: pointer; font-family: inherit;
  -webkit-appearance: none; appearance: none;
}
.pe-status--needed    { color: #ff8c66; border-color: #ff8c66; }
.pe-status--ordered   { color: #4a9eff; border-color: #4a9eff; }
.pe-status--arrived   { color: #f0c040; border-color: #f0c040; }
.pe-status--installed { color: #3fae6b; border-color: #3fae6b; }
.pe-status--cancelled { color: var(--text-muted); border-color: var(--border); }
.pe-status option { color: #111; }
