/* Conversations' one list (conv-list.js, docs/CONSOLE-REDESIGN.md §1.4, step 6). Flat: hairlines between rows, no boxed
   cards, a rule on the left for the chosen row. Tokens only (docs/THEMES.md). Every class here starts with cvl- (calls.css has cl-), plus the
   thread and context headers' face and title (cvh) that conversations.js and chat.js draw with the same face. Two widths:
   `data-width="full"` (rows with name, last line, who handles it, time and count) and `"faces"` (step 11's folded rail). */

.cvl { display: flex; flex-direction: column; min-height: 0; }
.cvl-search { padding: 10px 16px 0; }
.cvl-search[hidden] { display: none; }
.cvl-search input { width: 100%; height: 36px; background: var(--sunk); border: 1px solid var(--control); border-radius: 5px; padding: 0 10px; color: var(--text); font: 14px var(--sans); }
/* Wraps inside its pane (tt-fix-tour), as the Tasks list's chips do: nothing is hidden past the pane's edge. */
.cvl-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); flex: none; min-width: 0; }
.cvl-bar:empty { display: none; }
.cvl-bar .fchip { display: inline-flex; align-items: center; gap: 6px; height: 30px; }
.cvl-bar .cvl-st { margin-left: auto; padding-left: 6px; }
.cvl-rows { display: flex; flex-direction: column; }
.cvl-none { padding: 14px 16px; margin: 0; }
.cvl-none p { margin: 0 0 8px; }
.cvl-err { padding: 10px 16px; margin: 0; font-size: 12.5px; }
/* The list was cut by the Gate's limit (CONVERSATIONS §15h #1): one line under the rows, never a row of its own. */
.cvl-more { padding: 10px 16px; margin: 0; font-size: 12.5px; }

/* A row: the face, then name and time, the last line and the count, and who handles it. */
.cvl-row { display: flex; gap: 12px; align-items: flex-start; padding: 11px 16px 11px 14px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; min-width: 0; position: relative; }
.cvl-row:hover { background: var(--raised); }
.cvl-row:focus-visible { outline: var(--focus-w, 2px) solid var(--focus); outline-offset: -2px; }
.cvl-row[aria-current="true"] { background: var(--raised); box-shadow: inset 2px 0 0 var(--canopy); }
.cvl-row.muted { opacity: .62; }
.cvl-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cvl-t { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; min-width: 0; }
.cvl-t b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cvl-row.unread .cvl-t b { font-weight: 700; }
.cvl-t time { flex: none; font: 11.5px var(--mono); color: var(--text-3); }
.cvl-l { display: flex; gap: 8px; align-items: center; min-width: 0; font-size: 13px; color: var(--text-2); }
.cvl-row.unread .cvl-l { color: var(--text); }
.cvl-last { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cvl-last i { color: var(--text-3); }
.cvl-h { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cvl-h.warn { color: var(--warn); }
.cvl-w { color: var(--text-3); }
.cvl-n { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--canopy); color: var(--canopy-ink); font: 600 11px/18px var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
.cvl-n.at { background: var(--warn); color: var(--canopy-ink); }
.cvl-n.mute { background: var(--ink-3); color: var(--text-2); }
.cvl-mute { flex: none; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }

/* The face: two letters on a raised disc; a group is "#", an agent a rounded square with a dot while it works. A ring
   means it needs you (unread, owed a reply, an agent asking). */
.cvl-face { flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; position: relative;
  background: var(--ink-3); color: var(--text-2); font: 600 12.5px var(--sans); letter-spacing: .02em; }
.cvl-face.k-agent { border-radius: 9px; font-family: var(--mono); font-weight: 500; }
.cvl-face.k-customer { background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.cvl-face.grp { font-size: 15px; font-weight: 500; color: var(--text-3); }
.cvl-live { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--content-bg); }
/* A machine (the rail's, D12): a rounded square with the machine's icon, a dot for online (ok), waiting or busy (warn). */
.cvl-face.k-machine { border-radius: 9px; }
.cvl-face.k-machine svg { width: 18px; height: 18px; display: block; }
.cvl-on { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); box-shadow: 0 0 0 2px var(--content-bg); }
.cvl-on.up { background: var(--ok); }
.cvl-on.warn { background: var(--warn); }

/* Folded to faces (step 11's rail): one face per row, the count on its corner, the name in its title. */
.cvl[data-width="faces"] .cvl-row { padding: 8px 0; justify-content: center; border-bottom: 0; gap: 0; }
.cvl[data-width="faces"] .cvl-row[aria-current="true"] { box-shadow: inset 2px 0 0 var(--canopy); }
.cvl[data-width="faces"] .cvl-face { width: 40px; height: 40px; }
.cvl[data-width="faces"] .cvl-face.needs { box-shadow: 0 0 0 2px var(--content-bg), 0 0 0 4px var(--canopy); }
.cvl[data-width="faces"] .cvl-n { position: absolute; top: 4px; right: calc(50% - 26px); }
.cvl[data-width="faces"] .cvl-none, .cvl[data-width="faces"] .cvl-err, .cvl[data-width="faces"] .cvl-more, .cvl[data-width="faces"] .cp-empty { display: none; }

/* The thread's and the context's header (panels.js closableHead): a face, a name and one line under it. */
.pn-title .cvh { display: flex; gap: 10px; align-items: center; min-width: 0; }
.pn-title .cvh .cvl-face { width: 32px; height: 32px; font-size: 11.5px; }
.cvh-t, .cvh { min-width: 0; }
.cvh-t { display: flex; flex-direction: column; }
.pn-title .cvh h2 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-title .cvh p { margin: 1px 0 0; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-title .cvh p a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pn-title:has(.cvh) { flex: 1 1 auto; align-items: center; }
.pn[data-area="conversations"] .pn-h .ifo-btn { min-height: 34px; }
.cv-pin.on { border-color: var(--canopy); color: var(--text); }
.pn[data-area="conversations"] .pn-h h1 { font-size: 16px; }
.pn[data-area="conversations"] .cv-help-note { margin: 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.pn[data-area="conversations"] .cv-help-note[hidden] { display: none; }

@media (max-width: 780px) {
  .cvl-row { padding: 12px 14px; }
  .cvl-bar { padding: 10px 14px; }
  .cvl-search input { font-size: 16px; } /* no zoom on focus in iOS Safari */
  .pn-title .cvh p .cv-glance { display: none; }
  .cv-pin span { display: none; } /* the pin alone, beside Info, on a phone header */
}
