/* css/sales-reps-calls.css — Sales Reps: AI calls (js/sales-reps-calls.js): the list by kind, the test numbers and the
   editor in its panel. After sales-reps.css and sales-reps-manager.css. Prefix aic-. */

/* ── The list ── */
.aic .card-head { flex-wrap: wrap; gap: 8px 12px; }
.aic-kind-sub { margin: 0; padding: 0 20px 12px; font-size: 13px; color: var(--text-3); }
.aic-row { flex-wrap: wrap; }
.aic-row .grow { min-width: 160px; }
.aic-name { overflow-wrap: anywhere; }
.aic-badges { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.aic .sr-list .sr-li:first-child { border-top: 1px solid var(--border-soft); }

/* ── Paused, and the owner's switch ── */
.aic-paused { margin: 0 0 16px; font-size: 15px; line-height: 1.5; }
.aic-switch { display: flex; flex-direction: column; gap: 10px; }
.aic-switch .aic-plain { font-size: 15px; }
.aic-switch-acts { display: flex; flex-wrap: wrap; gap: 12px; }
.aic .aic-kill { color: var(--danger); border-color: var(--danger); }
.aic .aic-kill:hover { background: var(--danger-soft); }

/* ── Recent calls: each row one button that opens its transcript ── */
.aic-call {
  width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; border: 0;
  border-top: 1px solid var(--border-soft); cursor: pointer; min-height: 48px; align-items: flex-start;
}
.aic-call:hover { background: var(--surface-2); }
.aic-call .grow { display: flex; flex-direction: column; gap: 2px; }
.aic-call-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.aic-call-meta { font-size: 13px; color: var(--text-3); }
.aic-call-sum { font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.aic-call-go { flex: 0 0 auto; font-size: 13px; color: var(--accent-deep, var(--accent)); white-space: nowrap; padding-top: 2px; }

/* ── A transcript, in the panel: the speaker above the words, so it reads at phone width ── */
.aic-ts-meta { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.aic-ts-meta .aic-plain { font-size: 15px; }
.aic-ts-score { display: flex; flex-direction: column; gap: 6px; }
.aic-ts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.aic-ts-line { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.aic-ts-ai { background: var(--accent-softer, var(--accent-soft)); }
.aic-ts-who { font-size: 13px; font-weight: 600; color: var(--text-2); }
.aic-ts-text { font-size: 15px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }

/* ── Test numbers (always in the narrow column, so everything stacks) ── */
.aic-num { align-items: flex-start; }
.aic-num-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.aic-num .sr-mono { font-size: 13px; margin-top: 2px; }
.aic-nowrap { white-space: nowrap; }
.aic-num-act { margin-top: 8px; }
.aic-x {
  flex: 0 0 auto; width: 32px; height: 32px; border: 0; background: transparent; color: var(--text-3); font-size: 20px; line-height: 1;
  padding: 0; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.aic-x:hover { color: var(--danger); background: var(--danger-soft); }
/* Enter the code, in its own panel: the sign-in sheet's six boxes (App.CodeBoxes) at their own size. */
.aic-code { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 8px; }
.aic-code-one { max-width: 180px; min-height: 48px; letter-spacing: .2em; font-family: var(--f-mono, ui-monospace, monospace); }
.aic-add { display: flex; flex-direction: column; gap: 10px; padding: 14px 20px 18px; border-top: 1px solid var(--border-soft); }
.aic-add .btn { align-self: flex-start; }

/* ── The editor (inside the CBSheet panel; the sheet is 420px unless a surface widens it, as questions.css does) ── */
#cb-sheet .rel-editor:has(.aic-ed) { max-width: 760px; }
.aic-body .btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.aic-ed { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 12px; }
.aic-ed .field { min-width: 0; }
.aic-ed-top { display: flex; align-items: center; gap: 8px; }
.aic-msg { margin: 0; }
.aic-msg[hidden] { display: none; }
.aic-sec { border-top: 1px solid var(--border-soft); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.aic-sec-title { margin: 0; font-size: 14.5px; font-weight: 650; color: var(--text); }
.aic-sec-sub { margin: -6px 0 0; font-size: 13px; color: var(--text-3); }
.aic-sec-body { display: flex; flex-direction: column; gap: 12px; }
.aic-g { gap: 12px; }
.aic-ta { min-height: 0; }
.aic-label { font-size: 13px; color: var(--text-2); font-weight: 600; letter-spacing: .01em; }
.aic-plain { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }

.aic-list { display: flex; flex-direction: column; gap: 8px; }
.aic-list:empty { display: none; }
.aic-item { display: flex; align-items: flex-start; gap: 8px; }
.aic-n { flex: 0 0 auto; margin-top: 9px; }
.aic-item-f { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.aic-item-tools { display: flex; gap: 16px; flex: 0 0 auto; padding-top: 4px; }
.aic-ib {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px;
}
.aic-ib:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-deep); }
.aic-ib:disabled { opacity: .35; cursor: default; }
/* Every control a 48px hit area (CODING-STANDARDS, design principles: minimum touch target), painted smaller where the row
   reads better and the target grown by ::after, as css/sales-call.css does, never a thicker button. The row tools sit 16px
   apart so two 32px buttons' grown targets meet and do not overlap. */
.aic-ib, .aic-x, .aic .btn-sm, .aic-body .btn-sm { position: relative; }
.aic-ib::after, .aic-x::after, .aic .btn-sm::after, .aic-body .btn-sm::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 48px); height: max(100%, 48px); transform: translate(-50%, -50%);
}
.aic-add-btn { align-self: flex-start; }
.aic-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.aic-rub { display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: 8px; }
.aic-mini { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--text-2); min-width: 0; }
.aic-mini .input, .aic-mini .textarea { font-weight: 400; }
.aic-pts { text-align: center; }

.aic-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.aic-pick {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); font-size: 13px; cursor: pointer; max-width: 100%;
}
.aic-pick span { overflow-wrap: anywhere; }
.aic-pick:has(input:checked) { border-color: var(--accent); background: var(--accent-softer, var(--accent-soft)); }
.aic-pick input { margin: 0; accent-color: var(--accent); }

.aic-archive { border-top: 1px solid var(--border-soft); padding-top: 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.aic-archive-btn { color: var(--danger); }

/* A phone: the panel is the screen's width, outside sr-area, so its pairs stack here (sr-g2's own container query does
   not reach it); a list row's tools go under its field, so the field keeps the width; the footer words stay on a line. */
@media (max-width: 640px) {
  .aic-ed .aic-g { grid-template-columns: minmax(0, 1fr); }
  .aic-pair { grid-template-columns: minmax(0, 1fr); }
  .aic-rub { grid-template-columns: minmax(0, 1fr) 68px; }
  .aic-item { flex-wrap: wrap; row-gap: 6px; }
  .aic-item-f { flex-basis: calc(100% - 40px); }
  .aic-item[data-aic-item="steps"] .aic-item-f { flex-basis: calc(100% - 40px); }
  .aic-item-tools { flex-basis: 100%; justify-content: flex-end; padding-top: 0; }
  .aic-row .btn { margin-left: auto; }
  #cb-sheet .rel-editor:has(.aic-ed) .rel-ed-btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; }
}
