/**
 * sales-reps-call-history.css — Sales Reps: every call, booked and practice (js/sales-reps-call-history.js), drawn on
 * the rep's My calls and the manager's Call reviews: the search, the kind and the days, the list, "Show more calls",
 * and one call opened beside it.
 *
 * Built from the shared Sales Reps pieces (css/sales-reps.css: .sr-tbl, .sr-choice, .sr-split, .sr-empty, .sr-li; the
 * manager's .sr-mgr helpers: .sr-input, .sr-label, .sr-mark, tr.is-on) and the Dialer's player and conversation
 * (css/sales-reps-dialer-calls.css: .srd-player, .srd-rec, .sr-tx). Design tokens only. Everything here is prefixed
 * (srcl-) or scoped under .srcl, so nothing else moves. After sales-reps-dialer-calls.css.
 */

.srr-history { margin-top: 16px; }

/* The search, the kind and the days, above the list. */
.srcl .srcl-filters { display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--border-soft); }
.srcl .srcl-search { display: flex; gap: 8px; align-items: center; margin: 0; }
.srcl .srcl-search .sr-input { flex: 1 1 auto; min-width: 0; max-width: 440px; padding: 8px 12px; }
.srcl .srcl-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.srcl .srcl-row .sr-choice { align-self: center; }
.srcl .srcl-days { display: flex; gap: 12px; align-items: flex-end; }   /* From and To wrap together */
.srcl .srcl-date { display: flex; flex-direction: column; gap: 4px; }
.srcl .srcl-date .sr-input { width: auto; min-width: 150px; padding: 6px 10px; }

/* The list: when, the call (who, and for the team whose), how it went, the recording. */
.srcl .srcl-tbl td { vertical-align: top; }
.srcl .srcl-when { white-space: nowrap; }
.srcl .srcl-kind { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.srcl .srcl-how { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.srcl .srcl-how > div { flex-basis: 100%; }
.srcl .srcl-rec-cell { white-space: nowrap; }
.srcl .srcl-rec-line { margin-top: 4px; }
/* Every row opens its call, wherever it is tapped (a mail app's list, Gong's call library); the name is its button. */
.srcl .srcl-tbl tbody tr[data-srcl-row] { cursor: pointer; }
.srcl .srcl-tbl tbody tr[data-srcl-row]:hover td { background: var(--surface-2); }
.srcl .srcl-tbl tbody tr.is-on:hover td { background: var(--accent-softer); }
.srcl .srcl-chev { display: none; }
/* A name breaks between words, never inside one (the shared .sr-link breaks anywhere, for links: "A'Shellarien Addis on"). */
.srcl .srcl-tbl .sr-link { word-break: normal; overflow-wrap: break-word; }
.srcl .srcl-more { padding: 12px 20px; border-top: 1px solid var(--border-soft); }
.srcl .srcl-more[hidden] { display: none; }

/* One call. Back (a phone only) above its head; the score in words under it. */
.srcl .srcl-backbar { display: none; }
.srcl .srcl-scoreline { padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border-soft); }
.srcl .srcl-scoreline p { margin: 0; color: var(--text-2); }
.srcl .srcl-tight { gap: 6px; }
.srcl .srcl-note { color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: 8px 12px; }
.srcl .srcl-score-v { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 20px; margin: 0; }
.srcl .srcl-crit .sr-li { padding: 10px 0; }
.srcl .srcl-crit .sr-li:first-child { border-top: 0; }
.srcl-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Beside the list (the split's two columns), the open call stays in view while the list scrolls, as a mail reading pane
   does, so a call opened far down the list is read where the reader is. */
@container sr-area (min-width: 761px) {
  .srcl .srcl-split > [data-srcl-detail] { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
}

/* One column (a phone, or a narrow window): the open call takes the screen, as a message does in a mail app, with Back
   at its top in place of Close. Back puts the list back where it was (js: remember). */
@container sr-area (max-width: 760px) {
  .srcl .srcl-split > [data-srcl-list] { display: none; }
  .srcl [data-srcl-detail] { scroll-margin-top: 12px; }
  .srcl [data-srcl-detail] .card-head [data-srcl-close] { display: none; }
  .srcl .srcl-backbar { display: block; padding: 10px 12px 0; }
  .srcl .srcl-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 8px 12px 8px 6px; font-size: 15px; font-weight: 600; }
}

/* On a phone, a row becomes a block: the same cells, one under the other, no sideways scroll. */
@container sr-area (max-width: 620px) {
  .srcl .srcl-tbl table, .srcl .srcl-tbl tbody, .srcl .srcl-tbl tr, .srcl .srcl-tbl td { display: block; width: 100%; }
  .srcl .srcl-tbl thead { display: none; }
  .srcl .srcl-tbl tr { position: relative; padding: 12px 44px 12px 16px; border-bottom: 1px solid var(--border-soft); }
  .srcl .srcl-chev { display: block; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); line-height: 0; }
  .srcl .srcl-tbl tr:last-child { border-bottom: 0; }
  .srcl .srcl-tbl td { padding: 3px 0; border: 0; }
  .srcl .srcl-tbl td:empty { display: none; }
  .srcl .srcl-when { white-space: normal; }
  .srcl .srcl-search .sr-input { max-width: none; }
  .srcl .srcl-days { flex: 1 1 100%; }
  .srcl .srcl-date { flex: 1 1 0; min-width: 0; }
  .srcl .srcl-date .sr-input { width: 100%; min-width: 0; }
  .srcl .srcl-more { padding: 12px 16px; }
}
