/* Saariv Calls page: the tabs, the numbers, calls by day, the list of calls and one call's transcript. Colours and
   components come from ui.css, so it follows the theme. */
.cl-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.cl-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--sunken); border: 1px solid var(--border);
  border-radius: 999px; max-width: 100%; overflow-x: auto; }
.cl-seg-btn { height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.cl-seg-btn[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.cl-seg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cl-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 14px; }
.cl-waiting { margin: -6px 0 12px; }
.cl-chart-card { margin-bottom: 16px; }
.cl-chart-head { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.cl-chart { width: 100%; height: auto; max-height: 220px; display: block; }
.cl-bar-in { fill: var(--accent); }
.cl-bar-out { fill: var(--ok); }
.cl-axis { fill: var(--faint); font-size: 11px; }
.cl-legend { display: flex; gap: 16px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.cl-key::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.cl-key--in::before { background: var(--accent); }
.cl-key--out::before { background: var(--ok); }
.cl-app { margin-bottom: 16px; display: grid; gap: 10px; justify-items: start; }
.cl-app h3 { margin: 0; font-size: 16px; }
.cl-steps { margin: 0; padding-left: 20px; color: var(--text-2); line-height: 1.6; }
.cl-muted { margin: 0; color: var(--muted); font-size: 13px; }
.cl-empty { color: var(--muted); padding: 24px 4px; }

.cl-panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
.cl-list, .cl-read { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.cl-list { padding: 6px; max-height: 70vh; overflow-y: auto; }
.cl-read { padding: 18px 20px; display: grid; gap: 12px; align-content: start; min-height: 200px; }
.cl-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%;
  padding: 10px; border: 0; border-radius: var(--r-md); background: transparent; color: inherit; font: inherit;
  text-align: left; cursor: pointer; }
.cl-row:hover, .cl-row.is-on { background: var(--sunken); }
.cl-dir { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent-ink); }
.cl-dir--out { background: var(--ok-soft); color: var(--ok-ink); }
.cl-dir--missed, .cl-dir--rejected { background: var(--danger-soft); color: var(--danger-ink); }
.cl-row-main { display: grid; min-width: 0; }
.cl-row-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-row-sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-row-side { display: grid; justify-items: end; font-size: 12.5px; white-space: nowrap; max-width: 104px; }
.cl-row-side span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cl-read-head h3 { margin: 0; font-size: 17px; }
.cl-back { display: none; margin: -4px 0 6px -8px; }
.cl-summary { margin: 0; color: var(--text-2); line-height: 1.55; }
.cl-read > .ui-badge { justify-self: start; }
.cl-labels { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-lines { display: grid; gap: 10px; }
.cl-line { display: grid; gap: 2px; max-width: 88%; padding: 9px 12px; border-radius: 12px; background: var(--sunken); }
.cl-line p { margin: 0; line-height: 1.5; }
.cl-line--team { justify-self: end; background: var(--accent-soft); }
.cl-who { font-size: 12px; font-weight: 650; color: var(--muted); }
.cl-line--customer .cl-who { color: var(--ok-ink); }
.cl-line--team .cl-who { color: var(--accent-ink); }

@media (max-width: 1100px) { .cl-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .cl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-stats .ui-stat:last-child { grid-column: span 2; }
  .cl-panes { grid-template-columns: minmax(0, 1fr); }
  .cl-panes .cl-read { display: none; }
  .cl-panes.is-reading .cl-list { display: none; }
  .cl-panes.is-reading .cl-read { display: grid; }
  .cl-back { display: inline-flex; }
  .cl-line { max-width: 100%; }
}
