/**
 * sales-reps-paid.css · Sales Reps paid time (js/sales-reps-paid.js): the paid line on the rep's Today, My hours,
 * the manager's Timesheets and a rep's week with a bar of their states a day, and the two check-in sheets.
 *
 * ⚠️ ONLY WHAT PAID TIME ALONE DRAWS LIVES HERE, every class `srp-`. The tiles (.sr-kpi), tables (.sr-tbl), lists
 * (.sr-li), notes (.sr-why, .sr-note) and the app shell's .card, .btn and .badge are reused as they are; nothing
 * here restyles them. Colours are the design tokens only. After sales-reps.css.
 */

.srp-block { margin-bottom: 16px; }
.srp .sr-grow { flex: 1; min-width: 0; }
.srp-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.srp-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.srp-warn { color: var(--warn); font-weight: 600; }

/* ── the week picker: Earlier · This week · Later ── */
.srp-week { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: 3px; }
.srp-week .btn { white-space: nowrap; }
.srp-week-label { font-size: 13px; font-weight: 600; color: var(--text); padding: 0 8px; white-space: nowrap; }

/* ── Today: the paid line beside the Dialer strip, and the rule sentence under it ── */
.srp-solo { margin-bottom: 16px; }
.srp-paid .card-body { display: flex; flex-direction: column; gap: 6px; }
.srp-paid-line { display: flex; align-items: flex-start; gap: 9px; font-size: 15px; line-height: 1.4; color: var(--text); margin: 0; }
.srp-paid-line b { font-weight: 600; }
.srp-dot { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; margin-top: 5px; background: var(--text-4); }
.srp-paid.on { border-color: color-mix(in srgb, var(--good) 40%, var(--border)); }
.srp-paid.on .srp-dot { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.srp-paid-today { font-size: 13px; color: var(--text-2); margin: 0 0 0 19px; font-variant-numeric: tabular-nums; }
.srp-rule { font-size: 12.5px; color: var(--text-3); line-height: 1.45; margin: 4px 0 0; }
.srp-paid .srp-rule { border-top: 1px dashed var(--border); padding-top: 8px; margin-top: 6px; }

/* "Still there?" and "You are paused", inside CBSheet.panel. */
.srp-sheet { display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; }
.srp-sheet p { margin: 0; }

/* ── the week tables (My hours, Timesheets) ── */
.srp .sr-tbl td.sr-num, .srp .sr-tbl th { white-space: nowrap; }
.srp tr.srp-quiet td { color: var(--text-3); }
.srp tr.srp-total td { border-top: 1px solid var(--border); background: var(--surface-2); }
.srp tr.srp-flagged td { background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); }
.srp td.srp-act { text-align: right; }
.srp-name { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.srp-name:hover, .srp-name:focus-visible { color: var(--accent-deep); text-decoration: underline; }
.srp-flag { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; color: var(--warn); font-weight: 600; margin-top: 4px; white-space: normal; }
.srp-flag i { font-style: normal; width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.srp-flags .card-body { display: flex; flex-direction: column; gap: 4px; }
.srp-flags .srp-flag { margin-top: 0; font-size: 13px; }

/* A rep's flags: on their own line under the row on a wide screen, under the name on a phone. */
.srp .badge { white-space: nowrap; }
.srp-team th, .srp-team td { padding-left: 10px; padding-right: 10px; }
.srp-team th:first-child, .srp-team td:first-child { padding-left: 20px; }
.srp-team td.srp-who { min-width: 140px; }
.srp-team .srp-name { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-soft); }
.srp-team .srp-act { display: none; }
.srp tr.srp-flagged:not(.srp-flagrow) td { border-bottom: 0; }
.srp tr.srp-flagrow td { padding-top: 0; }
.srp tr.srp-flagrow .srp-flag { display: inline-flex; margin: 0 18px 0 0; }
.srp-flags-in { display: none; }
.srp tr.srp-later td { font-style: normal; }

/* ── a rep's week: Adjust and Approve, the rate, the days with their bars ── */
.srp-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.srp-acts .sr-err { flex: 1 1 100%; font-size: 13px; }
.srp-rate-v { font-family: "Bricolage Grotesque", sans-serif; font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.srp-legend { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-2); }
.srp-legend i { display: inline-block; width: 12px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.srp-days { display: flex; flex-direction: column; gap: 14px; }
.srp-ticks { position: relative; height: 14px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; color: var(--text-3); margin-bottom: -6px; }
.srp-ticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.srp-ticks span:first-child { transform: none; }
.srp-ticks span:last-child { transform: translateX(-100%); }
.srp-day { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border-soft); padding-top: 12px; }
.srp-day:nth-child(2) { border-top: 0; padding-top: 6px; }
.srp-day.quiet .srp-day-head b, .srp-day.quiet .srp-figs { color: var(--text-3); }
.srp-day-head { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.srp-day-head > b { font-size: 14px; min-width: 96px; color: var(--text); }
.srp-figs { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.srp-figs em { font-style: normal; color: var(--text-3); }
.srp-bar { position: relative; height: 16px; border-radius: 6px; background: var(--surface-3); overflow: visible; }
.srp-seg { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.srp-seg.k-ready, .srp-legend i.k-ready { background: color-mix(in srgb, var(--good) 60%, var(--surface)); }
.srp-seg.k-call, .srp-legend i.k-call { background: var(--accent); }
.srp-seg.k-break, .srp-legend i.k-break { background: color-mix(in srgb, var(--warn) 45%, var(--surface)); }
.srp-seg.k-other { background: var(--text-4); }
.srp-legend i.k-off { background: var(--surface-3); border: 1px solid var(--border); }
/* An automatic pause: where it happened on the bar. */
.srp-mark { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--danger); }
.srp-pauses { font-size: 12.5px; color: var(--danger); margin: 0; }
.srp-adj-line { font-size: 12.5px; color: var(--accent-deep); margin: 0; }

/* A phone: each row of a week table becomes a small block (its first cell across the top, then the figures in
   threes, each with its own label), so nothing a rep or a manager needs sits off the side of the screen. */
@container sr-area (max-width: 560px) {
  .srp .srp-cards thead { display: none; }
  .srp .srp-cards, .srp .srp-cards tbody { display: block; }
  .srp .srp-cards tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); }
  .srp .srp-cards tr:last-child { border-bottom: 0; }
  .srp .srp-cards td { padding: 0; border: 0; min-width: 0; }
  .srp .srp-cards td:first-child { grid-column: 1 / -1; }
  .srp .srp-cards td[colspan] { grid-column: 2 / -1; }
  .srp .srp-cards tr.srp-later { grid-template-columns: minmax(0, 1fr) auto; }
  .srp .srp-cards tr.srp-later td[colspan] { grid-column: auto; }
  .srp .srp-cards td[data-l]::before {
    content: attr(data-l); display: block; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px;
    letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 2px;
  }
  .srp .srp-cards td.srp-act { display: block; grid-column: 1 / -1; text-align: left; }
  .srp .srp-cards td.srp-who { min-width: 0; }
  .srp .srp-cards tr.srp-flagged { background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); }
  .srp .srp-cards tr.srp-total { background: var(--surface-2); border-top: 1px solid var(--border); }
  .srp .srp-cards tr.srp-flagged td, .srp .srp-cards tr.srp-total td { background: none; border-top: 0; }
  .srp .srp-cards tr.srp-flagrow { display: none; }
  .srp .srp-cards .srp-flags-in { display: block; }
  .srp tr.srp-flagged:not(.srp-flagrow) td { border-bottom: 0; }
}
@container sr-area (max-width: 620px) {
  .srp-head-right { width: 100%; }
  .srp-week { flex: 1 1 auto; justify-content: space-between; }
  .srp-day-head > b { min-width: 0; flex: 1 1 100%; }
}
@container sr-area (max-width: 480px) {
  .srp-acts .btn { flex: 1 1 auto; justify-content: center; }
}
