/* cc-model-picker — the shared model list (operator ruling 2026-09-20).
 *
 * These rules are the Launch-an-Agent dropdown's look, lifted verbatim from
 * .agent-launch-model-* in workforce/dock-visual.css, because that list is the
 * keeper. Both surfaces now render this markup, so both get these styles and
 * neither can drift.
 */
.cc-model-filter {
  width: 100%;
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  background: var(--ui-panel);
  color: var(--ui-text);
  font-family: var(--font-ui);
  font-size: 12.5px;
  padding: 7px 9px;
}
.cc-model-rows { display: block; }
/* Compact and single-line, exactly as the launch list is: the operator's
   word for it was "compact", and a row that wraps is a different row. */
.cc-model-row {
  /* Without this the 100% width EXCLUDES the row's own padding, so a row is
     wider than the list that holds it and the popover grows a horizontal
     scrollbar (measured: 403px row inside a 373px container). */
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: .4rem;
  width: 100%;
  height: 30px;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-bottom: 1px solid var(--ui-line-soft);
  border-radius: 8px;
  background: transparent;
  color: var(--ui-text-soft);
  cursor: pointer;
  font-family: var(--font-ui);
  text-align: left;
  transition: background var(--speed, 140ms) ease, color var(--speed, 140ms) ease;
}
.cc-model-row:last-child { border-bottom: none; }
.cc-model-row:hover:not(:disabled),
.cc-model-row:focus-visible,
.cc-model-row.active {
  background: color-mix(in srgb, var(--ui-accent) 10%, transparent);
  color: var(--ui-text);
}
.cc-model-row.is-selected {
  background: color-mix(in srgb, var(--ui-accent) 6%, transparent);
  color: var(--ui-text);
}
.cc-model-row:disabled { cursor: default; opacity: .6; }
.cc-model-row__mark { display: inline-flex; flex: 0 0 auto; }
.cc-model-row__icon { border-radius: 3px; }
.cc-model-row__line {
  display: flex;
  flex: 1 1 auto;
  align-items: baseline;
  min-width: 0;
  gap: .28rem;
  overflow: hidden;
  white-space: nowrap;
}
.cc-model-row__model,
.cc-model-row__route { overflow: hidden; text-overflow: ellipsis; }
.cc-model-row__route { font-family: var(--font-mono); font-size: 10.5px; }
.cc-model-row__sep { color: var(--ui-muted); }
.cc-model-row__model { font-size: 13px; font-weight: 500; }
/* Quiet, because it is a fact about the model, not a call to pick it. */
.cc-model-row__default {
  padding: 1px 6px;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  color: var(--ui-muted);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: .01em;
}
.cc-model-row__reason { color: var(--ui-muted); font-size: 10.5px; }
.cc-model-row__reason-action {
  border: 0; background: none; padding: 0;
  color: var(--ui-accent); cursor: pointer;
  font: inherit; text-decoration: underline;
}
/* The checkmark is the SESSION surface's one addition. It occupies its slot
   only when the row is the session's current model, so an unselected list has
   no ghost column. */
.cc-model-row__check { margin-left: auto; flex: 0 0 auto; opacity: 0; }
.cc-model-row.is-selected .cc-model-row__check { opacity: 1; color: var(--ui-accent); }
.cc-model-note {
  margin: 6px 0 0;
  padding: 0 11px;
  color: var(--ui-muted);
  font-size: 10.5px;
}
.cc-model-empty {
  margin: 0; padding: 12px;
  color: var(--ui-muted); font-size: 11.5px;
}
.cc-model-manage {
  display: block; width: 100%; margin-top: 4px; padding: 8px 11px;
  border: 0; border-top: 1px solid var(--ui-line-soft); border-radius: 0 0 8px 8px;
  background: transparent; cursor: pointer;
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 600;
  color: var(--ui-accent);
  transition: background var(--speed, 140ms) ease, color var(--speed, 140ms) ease;
}
.cc-model-manage:hover { background: var(--ui-hover); color: var(--ui-text); }
.cc-model-manage:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: -2px; }

/* cc-model-popover — the picker's PRESENTATION, shared exactly as its rows are.
 *
 * Operator ruling 2026-09-20 (post-#1733): "not the same... the launch one
 * goes from the picker upwards, sufficient width; the existing agent is full
 * width for no reason, shows up above the input field weirdly." #1733 shared
 * the rows but left each surface its own wrapper — 320px/10px/340px against
 * 400px/13px/480px. This is the launch popover's wrapper, and both surfaces
 * now wear it. Full width is the MOBILE bottom sheet's alone.
 *
 * Geometry (left/top/width) is written by runtime/popover-positioning.js, so
 * this carries only what does not depend on the anchor.
 */
.cc-model-popover {
  position: fixed;
  z-index: 2147483647;
  inset: auto;
  margin: 0;
  max-height: 480px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 5px;
  border: 1px solid var(--ui-line);
  border-radius: 13px;
  background: var(--ui-raised);
  color: var(--ui-text);
  box-shadow: var(--ui-shadow);
}
.cc-model-popover[hidden] { display: none; }

/* Provider headings. The launch list groups its rows by provider and the
   session list did not, which left the two distinguishable at a glance —
   the operator's acceptance for 2026-09-20 is "indistinguishable except the
   checkmark/next-message note". The keeper has them, so the component has
   them, so both surfaces have them. */
.cc-model-group {
  padding: 8px 10px 3px;
  color: var(--ui-muted);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .02em;
}
