/* ── Picklist badges + values editor — specs/picklist-values.md ──
   Loaded by my-procurement-app.njk (every buyer page), so any page can render a badge:
   <span class="pl-badge pl-badge--blue">Published</span>. The palette is fixed (7 tones, light
   ground + dark text, each ≥ 4.5:1) so admins can't pick an unreadable colour; tones also differ
   in lightness, so they stay distinguishable without colour vision. */

.pl-badge {
    display: inline-flex; align-items: center; max-width: 100%;
    height: 24px; padding: 0 10px; box-sizing: border-box;
    border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: #eef1f5; color: #334155;
}
.pl-badge--gray   { background: #eef1f5; color: #334155; }
.pl-badge--blue   { background: #e3eefb; color: #0b4a8f; }
.pl-badge--green  { background: #e1f3e6; color: #1d6436; }
.pl-badge--amber  { background: #fdeedd; color: #84470b; }
.pl-badge--red    { background: #fde7e5; color: #9f2a1f; }
.pl-badge--purple { background: #eee8fb; color: #563597; }
.pl-badge--teal   { background: #dcf3f0; color: #0f5f59; }

/* ── Values editor (static/js/picklist-editor.js) ── */
.pe-wrap { display: flex; flex-direction: column; gap: 8px; }
.pe-head, .pe-row {
    display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 132px 96px;
    gap: 8px; align-items: center;
}
.pe-head { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #718096; padding: 0 2px; }
.pe-row { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px; }
.pe-row input, .pe-row select {
    width: 100%; min-width: 0; height: 34px; padding: 0 8px; box-sizing: border-box;
    border: 1px solid #cbd5e0; border-radius: 6px; font: inherit; font-size: 0.86rem; color: #2d3748; background: #fff;
}
.pe-row input:focus, .pe-row select:focus { outline: none; border-color: #4299e1; box-shadow: 0 0 0 3px rgba(66,153,225,.18); }
.pe-row input:disabled { background: #edf2f7; color: #718096; }
.pe-value { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.82rem !important; }
.pe-actions { display: flex; gap: 4px; justify-content: flex-end; }
.pe-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border: 1px solid #cbd5e0; border-radius: 6px;
    background: #fff; color: #4a5568; cursor: pointer; padding: 0;
}
.pe-icon-btn:hover:not(:disabled) { border-color: #2b6cb0; color: #2b6cb0; }
.pe-icon-btn:disabled { opacity: 0.35; cursor: default; }
.pe-icon-btn.pe-del:hover:not(:disabled) { border-color: #c53030; color: #c53030; }
.pe-preview { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.78rem; color: #718096; }
.pe-preview:empty { display: none; }
.pe-rename { color: #975a16; }
.pe-add {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border: 1px dashed #90cdf4; border-radius: 6px; background: #f5faff;
    color: #2b6cb0; font: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer;
}
.pe-add:hover { background: #ebf8ff; }
.pe-note { font-size: 0.78rem; color: #718096; margin: 0; }

@media (max-width: 600px) {
    .pe-head { display: none; }
    .pe-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .pe-row .pe-label-in { grid-column: 1 / -1; }
    .pe-actions { justify-content: flex-start; }
}
