/* conv-head.css — the pieces conv-head.js adds to the conversation header,
 * in respond.io's measures: 32px controls with 8px corners and a hairline,
 * 14px words, menus of 32px rows. The stage chip is split like theirs: the
 * stage, then a › to the next one. No coloured edges; lime only where
 * something is chosen. */

.crm-ch-stage, .crm-ch-btn, .crm-ch-menu {
  --ch-line: rgba(53, 60, 69, .16);
  --ch-ink: #282e34;
  --ch-muted: #626f7f;
  --ch-card: #ffffff;
  --ch-hover: #f5f6f7;
  --ch-pick: #f6fcdc;
}
:root.dark .crm-ch-stage, .dark .crm-ch-stage, :root.dark .crm-ch-btn, .dark .crm-ch-btn, :root.dark .crm-ch-menu, .dark .crm-ch-menu {
  --ch-line: #2c3138;
  --ch-ink: #e8eaed;
  --ch-muted: #9aa3af;
  --ch-card: #1b1e23;
  --ch-hover: rgba(255, 255, 255, .06);
  --ch-pick: rgba(212, 251, 8, .10);
}

/* ---------- the stage chip ---------- */
.crm-ch-stage {
  display: inline-flex;
  align-items: stretch;
  height: 32px;
  margin-inline-start: 16px;
  flex: none;
  border: 1px solid var(--ch-line);
  border-radius: 8px;
  background: var(--ch-card);
  overflow: hidden;
}
.crm-ch-stage button {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: var(--ch-ink);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.crm-ch-stage__main { padding: 0 10px; max-width: 220px; }
.crm-ch-stage__main > i { font-size: 16px; color: var(--ch-muted); }
.crm-ch-stage__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-ch-stage__next { padding: 0 8px; border-inline-start: 1px solid var(--ch-line) !important; font-size: 16px; }
.crm-ch-stage button:hover:not(:disabled) { background: var(--ch-hover); }
.crm-ch-stage button:disabled { color: var(--ch-muted); cursor: default; opacity: .5; }

/* ---------- header buttons ---------- */
.crm-ch-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; flex: none;
  border: 0; border-radius: 8px; background: transparent; color: var(--ch-ink);
  font: inherit; font-size: 14px; cursor: pointer;
}
.crm-ch-btn:hover { background: var(--ch-hover); }
.crm-ch-icon { width: 32px; font-size: 19px; }
.crm-ch-assignee { padding: 0 6px; max-width: 200px; font-weight: 500; }
.crm-ch-assignee > i { font-size: 14px; color: var(--ch-muted); }
.crm-ch-assignee__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }

.crm-ch-av {
  width: 22px; height: 22px; flex: none; border-radius: 50%; overflow: hidden;
  display: inline-grid; place-items: center; background: #f2f2f3; color: #282e34; font-size: 11px; font-weight: 600;
}
.dark .crm-ch-av { background: rgba(255, 255, 255, .08); color: #e8eaed; }
.crm-ch-av img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- the menu ---------- */
.crm-ch-menu {
  position: fixed;
  z-index: 2147480000;
  min-width: 220px;
  max-width: 320px;
  max-height: 420px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--ch-line);
  border-radius: 8px;
  background: var(--ch-card);
  color: var(--ch-ink);
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
  font-size: 14px;
}
.crm-ch-menu__label { padding: 6px 8px 4px; color: var(--ch-muted); font-size: 12px; font-weight: 600; }
.crm-ch-menu__search {
  width: 100%; height: 30px; margin-bottom: 6px; padding: 0 10px; box-sizing: border-box;
  border: 1px solid var(--ch-line); border-radius: 8px; background: var(--ch-card); color: var(--ch-ink); font: inherit; font-size: 14px;
}
.crm-ch-menu__item {
  width: 100%; min-height: 32px; display: flex; align-items: center; gap: 8px; padding: 4px 8px;
  border: 0; border-radius: 8px; background: transparent; color: var(--ch-ink);
  font: inherit; font-size: 14px; text-align: start; cursor: pointer; box-sizing: border-box;
}
.crm-ch-menu__item:hover { background: var(--ch-hover); }
.crm-ch-menu__item.is-on { background: var(--ch-pick); font-weight: 600; }
.crm-ch-menu__item > i { font-size: 16px; color: var(--ch-muted); }
.crm-ch-menu__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-ch-menu__tail { color: var(--ch-muted); font-size: 12px; white-space: nowrap; }
.crm-ch-menu__pick { position: relative; border-top: 1px solid var(--ch-line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.crm-ch-menu__pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.crm-ch-tick {
  width: 16px; height: 16px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--ch-line); border-radius: 4px; font-size: 11px; color: transparent;
}
.crm-ch-tick.is-on { background: #d4fb08; border-color: #d4fb08; color: #000; }

.crm-ch-toast {
  position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 2147480001;
  padding: 10px 14px; border-radius: 8px; background: #282e34; color: #fff; font-size: 13px;
}

/* A deal paid in full: "Won", nothing to press (owner, 2026-10-04). */
.crm-ch-stage__won { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: #067647; cursor: default; }
.crm-ch-stage__won > i { color: #067647 !important; }
.dark .crm-ch-stage__won, .dark .crm-ch-stage__won > i { color: #75e0a7 !important; }

/* The customer's answer on the quote page, beside the stage (owner, 2026-10-04). */
.crm-ch-stage__ans { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; margin-inline-start: 6px; }
.crm-ch-stage__ans.is-yes { background: #ecfdf3; color: #067647; }
.crm-ch-stage__ans.is-no { background: var(--crm-alert-bg, #fff1f2); color: var(--crm-alert-ink, #c8243b); }
.dark .crm-ch-stage__ans.is-yes { background: rgba(23, 178, 106, .18); color: #75e0a7; }

/* A stage's colour and emoji, from the deal board's column settings (owner, 2026-10-04). */
.crm-ch-mark { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.crm-ch-mark__dot { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.crm-ch-mark__emo { font-size: 14px; line-height: 1; }
