/* One colour per stage (v2/choices.py _TONE): the quote list's dot, the status chip, the status
   filter and the Progress tree draw a stage in the same colour. Project managers take one of
   the same colours (static/quote-panel.js pmTone). */
.qp-tone-grey    { --tone: #6B7280; --tone-bg: #F1F2F4; }
.qp-tone-blue    { --tone: #2563EB; --tone-bg: #E8F0FE; }
.qp-tone-violet  { --tone: #7C3AED; --tone-bg: #F1EBFE; }
.qp-tone-amber   { --tone: #B45309; --tone-bg: #FEF3E2; }
.qp-tone-teal    { --tone: #0F766E; --tone-bg: #E3F5F3; }
.qp-tone-indigo  { --tone: #4338CA; --tone-bg: #ECEBFD; }
.qp-tone-orange  { --tone: #C2410C; --tone-bg: #FFEDE3; }
.qp-tone-green   { --tone: #15803D; --tone-bg: #E6F5EA; }
.qp-tone-emerald { --tone: #065F46; --tone-bg: #DDF2EA; }
.qp-tone-red     { --tone: #B91C1C; --tone-bg: #FDE8E8; }
.qp-tone-slate   { --tone: #334155; --tone-bg: #E2E8F0; }

.qp-chip[class*="qp-tone-"] { background: var(--tone-bg); }
.qp-chip[class*="qp-tone-"]::before { background: var(--tone); }
.sidebar .sidebar-item .ql-dot[class*="qp-tone-"] { background: var(--tone); }

/* Progress: a finished or current step takes its stage's colour. */
.be-progress__step[class*="qp-tone-"][data-state="done"] .be-progress__node { border-color: var(--tone); background: var(--tone); }
/* No halo or shading on the current step: the tick and the stage colour are enough (Katlego, 2026-11-23). */
.be-progress__step[class*="qp-tone-"][data-state="current"] .be-progress__node { border-color: var(--tone); background: var(--tone); box-shadow: none; }

/* The two list filters: a coloured button and a menu of coloured choices. */
.sb-pick { position: relative; flex: 1 1 0; min-width: 0; }
.sb-pick__btn {
  display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; height: 32px; padding: 0 26px 0 10px;
  border: 1px solid var(--line, #d0d4da); border-radius: 8px; background: var(--ground, #fff);
  font: 500 13px/18px var(--font-sans, system-ui); color: var(--ink, #111); cursor: pointer; text-align: left;
}
.sb-pick__btn::after { content: ""; position: absolute; right: 10px; top: 13px; border: 4px solid transparent; border-top-color: currentColor; }
/* A see-through tint of the stage colour, not the pastel --tone-bg: the sidebar is dark in the dark theme, and
   its light text vanished on a light pastel (Katlego, 2026-11-22). The text keeps the theme's own colour. */
.sb-pick__btn[class*="qp-tone-"] { background: color-mix(in srgb, var(--tone) 22%, transparent); border-color: var(--tone); }
.sb-pick__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-pick__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--tone, transparent); border: 1px solid var(--tone, var(--line-strong, #9aa1ab)); }
.sb-pick__menu {
  position: absolute; z-index: 30; left: 0; top: 36px; min-width: 100%; max-height: 320px; overflow-y: auto; margin: 0; padding: 4px;
  list-style: none; background: var(--ground, #fff); border: 1px solid var(--line, #d0d4da); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
.sb-pick__menu[hidden] { display: none; }
.sb-pick__opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font: 500 13px/18px var(--font-sans, system-ui); white-space: nowrap; cursor: pointer; }
.sb-pick__menu .sb-pick__opt { background: transparent; }
.sb-pick__menu .sb-pick__opt::before { display: none; }
.sb-pick__menu .sb-pick__opt:hover, .sb-pick__menu .sb-pick__opt[aria-selected="true"], .sb-pick__menu .sb-pick__opt:focus { background: color-mix(in srgb, var(--tone, #6B7280) 22%, transparent); outline: none; }
.sb-pick select { display: none; }
/* The same pick inside a dialog (C-03: the start's Client, Site and Client representative; the panel dialog's
   Outcome and How it was sent): the dialog's field look; a filter line at the top of a long menu that only
   narrows the choices (nothing typed there reaches the quote); "Add a new one" as the menu's last row. */
.qp-dialog .sb-pick { flex: none; width: 100%; }
.qp-dialog .sb-pick__btn {
  height: auto; min-height: 32px; background: var(--bg-input, var(--ground, #fff));
  border-color: var(--border, var(--line, #d0d4da)); color: var(--text, var(--ink, #111));
}
.qp-dialog .sb-pick__menu { max-height: min(320px, 40vh); }
.sb-pick__find { padding: 2px 4px 6px; }
.sb-pick__find input {
  width: 100%; box-sizing: border-box; height: 28px; padding: 0 8px; border: 1px solid var(--line, #d0d4da); border-radius: 6px;
  background: var(--ground, #fff); color: var(--ink, #111); font: 500 13px/18px var(--font-sans, system-ui);
}
/* The filter line's hint "Search" in the sidebar search's placeholder ink (index.html .sidebar-search input::placeholder). */
.sb-pick__find input::placeholder { color: var(--text-tertiary, var(--ink-muted, #6b7280)); }
.sb-pick__opt[hidden] { display: none; }
.sb-pick__add { margin-top: 4px; border-top: 1px solid var(--line, #d0d4da); border-radius: 0 0 6px 6px; padding-top: 8px; }

/* A day with no quote left under the filters is hidden (quote-panel.js recountDays); its flex layout
   would otherwise win over the hidden attribute. */
.sidebar .ql-day[hidden], .sidebar .ql-nomatch[hidden] { display: none; }
