/* public/widgets/ghl-records.css - the Inbox's GoHighLevel records (public/widgets/ghl-records.js). Tokens only (design
   system), both themes. Bubbles use the chat tokens: green is OUR side (design-system-v2 5.4), theirs is the surface. */

/* One gutter (2026-11-14): the list pads 8px and the controls (Lines, chips, search) sit 8px in again, so they start at 16px like the tab
   strip above and the avatars (8 + the row's own 8) line up with them. The phone sheet's own tab strip is 12px (--ghr-pad: 4px). */
.ghr-list { display: flex; flex-direction: column; gap: 6px; padding: 6px var(--ghr-pad, 8px); }
.ghr-linerow, .ghr-kinds, .ghr-searchrow, .ghr-from, .ghr-sum { margin-inline: 8px; }
.ghr-searchrow .ghr-search { width: 100%; }
.ghr-rows { display: flex; flex-direction: column; gap: 2px; }
.ghr-empty { color: var(--ink-2); font-size: var(--text-sm); padding: 14px 6px; text-align: center; }
.ghr-item { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: transparent; border: 0;
  border-radius: 10px; padding: 9px 8px; color: var(--ink); cursor: pointer; font: inherit; }
.ghr-item:hover, .ghr-item:focus-visible { background: var(--surface-2); }
.ghr-item.ghr-on { background: var(--surface-2); }
.ghr-av svg { width: 18px; height: 18px; }
.ghr-av { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  font-size: var(--text-xs); background: var(--accent-soft); color: var(--accent-ink); }
.ghr-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ghr-top { display: flex; justify-content: space-between; gap: 8px; font-size: var(--text-sm); }
.ghr-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ghr-time { color: var(--ink-3); font-size: var(--text-xs); flex: none; }
.ghr-sub { color: var(--ink-2); font-size: var(--text-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ghr-badge { display: inline-block; font-size: 10px; font-weight: 800; border-radius: 6px; padding: 0 5px; margin-right: 2px; }
.ghr-b-ht { background: var(--success-soft); color: var(--success-ink); }
.ghr-b-lead { background: var(--accent-soft); color: var(--accent-ink); }
.ghr-b-no { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border); }
/* One of our own team (a staff contact, 2026-11-05): shown only to a person whose Calls & texts keys allow it. */
.ghr-b-team { background: var(--info-soft); color: var(--ink); }
.ghr-more { margin: 8px auto; }

.ghr-rec { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ghr-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.ghr-who { flex: 1; min-width: 0; }
.ghr-name { font-weight: 800; font-size: var(--text-md); }
.ghr-dim { color: var(--ink-2); font-size: var(--text-xs); margin: 2px 0; }
.ghr-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 8px; }
.ghr-chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--ink-2); border-radius: 999px;
  padding: 3px 10px; font: inherit; font-size: var(--text-xs); font-weight: 700; cursor: pointer; }
.ghr-chip-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.ghr-body { display: flex; gap: 14px; flex: 1; min-height: 0; padding: 0 14px 14px; }
.ghr-thread { flex: 1; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; }
.ghr-side { width: 290px; flex: none; overflow-y: auto; }
.ghr-older { align-self: center; margin: 4px 0 8px; }
.ghr-day { align-self: center; color: var(--ink-2); font-size: var(--text-xs); font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; margin: 12px 0 6px; }
.ghr-msg { max-width: 72%; border-radius: 14px; padding: 8px 11px; margin: 4px 0; border: 1px solid; font-size: var(--text-sm);
  white-space: pre-wrap; overflow-wrap: anywhere; }
.ghr-theirs { align-self: flex-start; background: var(--chat-theirs-bg); border-color: var(--chat-theirs-border); color: var(--chat-theirs-ink); }
.ghr-mine { align-self: flex-end; background: var(--chat-mine-bg); border-color: var(--chat-mine-border); color: var(--chat-mine-ink); }
.ghr-meta { font-size: var(--text-xs); margin-top: 3px; color: var(--chat-theirs-meta); }
.ghr-mine .ghr-meta { color: var(--chat-mine-meta); }
.ghr-ev { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 9px 11px; margin: 6px 0;
  font-size: var(--text-sm); max-width: 86%; }
.ghr-ev-comment { border-style: dashed; }
.ghr-auto { align-self: stretch; margin: 3px 0; border: 1px dashed var(--border); border-radius: 10px; padding: 4px 10px;
  color: var(--ink-2); font-size: var(--text-xs); }
.ghr-auto summary { cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ghr-auto[open] summary { white-space: normal; }
.ghr-auto .ghr-tx-body { color: var(--ink); }
.ghr-evh { display: flex; gap: 9px; align-items: center; }
.ghr-evh b { display: block; }
.ghr-evh small { color: var(--ink-2); font-size: var(--text-xs); }
.ghr-ic { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; font-weight: 900; font-size: 12px; }
.ghr-ic-call { background: var(--accent-soft); color: var(--accent-ink); }
.ghr-ic-vm, .ghr-ic-int { background: var(--surface-3); color: var(--ink); }
.ghr-ic-mail { background: var(--surface-2); color: var(--ink-2); }
.ghr-audio { display: block; width: 100%; margin-top: 8px; height: 34px; }
.ghr-tx { margin-top: 7px; }
.ghr-tx summary { cursor: pointer; color: var(--accent-ink); font-weight: 700; font-size: var(--text-xs); }
/* Where a client's email sits (2026-11-19, services/ghl-mirror/zoho-rows.js): the mailbox tag on the card, the From / To / Subject lines inside it,
   and the read-only note. Tokens only. */
.ghr-box { display: inline-block; margin-left: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2); border-radius: 6px;
  padding: 0 6px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.ghr-hdr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 8px; color: var(--ink-2); font-size: var(--text-xs); margin-bottom: 6px; }
.ghr-hdr b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.ghr-note { color: var(--ink-2); font-size: var(--text-xs); margin-top: 6px; }
.ghr-tx-body { margin-top: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px;
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--text-sm); max-height: 320px; overflow-y: auto; }
.ghr-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.ghr-card h3 { margin: 0 0 6px; font-size: var(--text-sm); }
.ghr-card p { margin: 2px 0 6px; font-size: var(--text-sm); }
.ghr-li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-sm); }
.ghr-li:last-child { border-bottom: 0; }
.ghr-li small { display: block; color: var(--ink-2); font-size: var(--text-xs); }

/* Phone: one column; the customer is a bar under the name (.ghr-custbar, below), never after the thread. */
.ghr-phone .ghr-body { padding: 0 12px 8px; }
.ghr-phone .ghr-msg { max-width: 86%; }
.ghr-phone .ghr-ev { max-width: 100%; }
@media (max-width: 900px) { .ghr-side { width: 240px; } }

/* The phone's full-screen layer (ghl-records.js openPhone): over the page and the Inbox sheet, under the safe area. */
.ghr-layer { position: fixed; inset: 0; z-index: 2147483000; background: var(--bg); color: var(--ink); display: flex;
  flex-direction: column; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.ghr-layer-bar { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--border);
  background: var(--surface); }
.ghr-layer-back { border: 0; background: transparent; color: var(--accent-ink); font: inherit; font-weight: 800; padding: 6px 4px;
  min-height: 44px; cursor: pointer; }
.ghr-layer-list, .ghr-layer-pane { flex: 1; min-height: 0; overflow-y: auto; }
.ghr-layer-list[hidden], .ghr-layer-pane[hidden] { display: none; }
.ghr-layer-pane .ghr-rec { height: auto; }
.ghr-layer-pane .ghr-thread { overflow: visible; }

/* ── Calls & texts (2026-11-04, the approved design canvas) ─────────────────────────────────────────────────────
   The list's chips wrap (never a hidden sideways scroll); the search's two modes; each row's line, Hope, missed. */
/* The line picker (access by phone line, migration 621): "Lines:" and a native select of my lines; it wraps under the
   label on a narrow rail. */
.ghr-linerow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 2px 4px; }
.ghr-line-lab { color: var(--ink-2); font-size: var(--text-sm); font-weight: 600; }
.ghr-line-sel { flex: 1 1 180px; min-width: 0; width: auto; min-height: 36px; }
/* 2026-11-14: the five chips are ONE row (All, Calls, Texts, Missed, VM), never wrapped. */
.ghr-kinds { display: flex; flex-wrap: nowrap; gap: 6px; padding: 2px 0; }
.ghr-kinds .ghr-kind { flex: 1 1 auto; justify-content: center; white-space: nowrap; padding: 0 10px; }
.ghr-from { margin-block: 4px 2px; color: var(--ink-3); font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ghr-kind { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--text-sm);
  font-weight: 600; cursor: pointer; }
.ghr-kind-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.ghr-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--surface);
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.ghr-sum { margin-block: 2px; color: var(--ink-2); font-size: var(--text-xs); }
.ghr-unread .ghr-top b, .ghr-unread .ghr-sub { color: var(--ink); font-weight: 800; }
.ghr-dot { flex: none; align-self: center; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.ghr-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.ghr-sub.ghr-sub-missed { color: var(--danger-ink); font-weight: 700; }
.ghr-tags, .ghr-tagrow { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ghr-line, .ghr-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px;
  font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.ghr-tag-hope { background: var(--info-soft); color: var(--brand-sky-ink); }
.ghr-tag-missed { background: var(--danger-soft); color: var(--danger-ink); }
.ghr-hit .ghr-m { gap: 4px; }
.ghr-snip { color: var(--ink-2); font-size: var(--text-xs); line-height: 1.45; white-space: normal; overflow-wrap: anywhere; }
.ghr-list mark, .ghr-call mark { background: color-mix(in srgb, var(--warn) 35%, transparent); color: inherit; border-radius: 3px;
  padding: 0 2px; }
.ghr-call mark.ghr-hit-on { background: color-mix(in srgb, var(--warn) 70%, transparent); outline: 2px solid var(--warn); }

/* One call: the head (inbound / outbound / missed / voicemail / Hope, who, our line), the shared player
   (call-player.js, styles in design-system.css), how it sounded, the transcript line by line. */
.ghr-call { align-self: stretch; max-width: 760px; width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; }
.ghr-call-missed { border-color: var(--danger); }
.ghr-evt { flex: 1; min-width: 0; }
.ghr-ic-missed { background: var(--danger-soft); color: var(--danger-ink); }
.ghr-call .cp { box-shadow: none; }
.ghr-call .cp-mark-hit { background: var(--warn); top: 2px; width: 4px; height: 15px; margin-left: -2px; }
/* The call summary (2026-11-05, the approved mockups): a folded row (Summary, how it ended, the headline) that opens to
   the key points, the customer's mood, the outcome and the next steps as a list. The transcript folds the same way.
   The score in the card's corner opens the call's scoring page. */
.ghr-sum2, .ghr-tx-lines { border-top: 1px solid var(--border-subtle); padding-top: 6px; }
.ghr-sum2 > summary, .ghr-tx-lines > summary { cursor: pointer; list-style: none; min-height: 32px; display: flex; align-items: center; gap: 8px; }
.ghr-sum2 > summary::-webkit-details-marker, .ghr-tx-lines > summary::-webkit-details-marker { display: none; }
.ghr-sum2 > summary::before, .ghr-tx-lines > summary::before { content: ''; flex: none; width: 7px; height: 7px; margin: 0 4px 0 3px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform 0.12s; }
.ghr-sum2[open] > summary::before, .ghr-tx-lines[open] > summary::before { transform: rotate(45deg); }
.ghr-sum2 > summary:focus-visible, .ghr-tx-lines > summary:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
.ghr-sum2-h { flex: none; color: var(--accent-ink); font-weight: 700; font-size: var(--text-xs); }
.ghr-sum2-head { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: var(--text-sm); }
.ghr-out { display: inline-flex; align-items: center; flex: none; height: 20px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 700;
  background: var(--surface-2); color: var(--ink-2); }
.ghr-out-good { background: var(--success-soft); color: var(--success-ink); }
.ghr-out-attn { background: var(--warn-soft); color: var(--warn-ink); }
.ghr-out-bad { background: var(--danger-soft); color: var(--danger-ink); }
.ghr-sum2-body { margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px;
  font-size: var(--text-sm); line-height: 1.5; color: var(--ink); }
.ghr-sum2-pts { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.ghr-sum2-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; }
.ghr-sum2-k { color: var(--ink-2); font-weight: 700; font-size: var(--text-xs); padding-top: 2px; }
.ghr-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ghr-step { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
/* The next steps are tick boxes now (2026-11-13): a thumb-size hit area around the 18px box, tokens only. */
.ghr-step-box { position: relative; width: 18px; height: 18px; margin-top: 1px; padding: 0; border: 1.5px solid var(--ink-3); border-radius: 5px; box-sizing: border-box;
  background: var(--surface); color: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font: inherit; }
.ghr-step-box::after { content: ''; position: absolute; inset: -8px; }
.ghr-step-box:focus-visible { outline: none; box-shadow: var(--ring); }
.ghr-step-box:disabled { cursor: progress; opacity: 0.6; }
.ghr-step-box.on { background: var(--success-soft); border-color: var(--success); color: var(--success-ink); }
.ghr-step-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ghr-step-done { color: var(--ink-3); text-decoration: line-through; }
.ghr-step-sub { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.ghr-step-ok { font-size: var(--text-xs); color: var(--success-ink); }
.ghr-chip { font-size: var(--text-xs); font-weight: 600; background: var(--accent-soft); color: var(--accent-ink); border-radius: 6px; padding: 1px 8px; }
.ghr-link-btn { font: inherit; font-size: var(--text-xs); font-weight: 600; color: var(--accent-ink); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 3px 12px; min-height: 32px; cursor: pointer; }
.ghr-link-btn:hover { background: var(--accent-soft); }
.ghr-link-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.ghr-link-quiet { border-color: transparent; background: transparent; font-weight: 500; color: var(--ink-2); }
.ghr-pick { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; margin: 2px 0 4px 26px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.ghr-pick-note { margin: 0; font-size: var(--text-xs); color: var(--ink-2); }
.ghr-pick-opt { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; font: inherit; font-size: var(--text-sm); color: var(--ink); background: transparent;
  border: 1px solid var(--border-subtle); border-radius: 8px; padding: 6px 10px; min-height: 36px; cursor: pointer; }
.ghr-pick-opt:hover { background: var(--accent-soft); }
.ghr-pick-opt.on { border-color: var(--accent); }
.ghr-pick-opt:focus-visible { outline: none; box-shadow: var(--ring); }
.ghr-pick-l { font-weight: 600; }
.ghr-pick-d { color: var(--ink-2); font-size: var(--text-xs); }
.ghr-pick-quiet { color: var(--ink-2); border-color: transparent; }
.ghr-step-meta { color: var(--ink-2); font-size: var(--text-xs); white-space: nowrap; padding-top: 2px; }
.ghr-score { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 48px; height: 46px;
  border-radius: 10px; border: 1px solid var(--border); text-decoration: none; line-height: 1.1; }
.ghr-score:hover { filter: brightness(0.97); }
.ghr-score:focus-visible { outline: none; box-shadow: var(--ring); }
.ghr-score-l { font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.ghr-score-n { font-size: 19px; font-weight: 800; }
.ghr-score-good { background: var(--success-soft); color: var(--success-ink); }
.ghr-score-mid { background: var(--info-soft); color: var(--brand-sky-ink); }
.ghr-score-low { background: var(--warn-soft); color: var(--warn-ink); }
.ghr-score-bad { background: var(--danger-soft); color: var(--danger-ink); }
.ghr-tx-lines summary .ghr-dim { font-weight: 400; }
.ghr-find { display: flex; align-items: center; gap: 6px; margin: 8px 0 4px; }
.ghr-find-in { flex: 1 1 160px; min-width: 0; max-width: 260px; }
.ghr-find-n { color: var(--ink-2); font-size: var(--text-xs); white-space: nowrap; }
.ghr-find-b { width: 34px; height: 34px; flex: none; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--ink-2); display: inline-grid; place-items: center; cursor: pointer; }
.ghr-lines { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; }
.ghr-tl { display: grid; grid-template-columns: 44px 84px minmax(0, 1fr); gap: 8px; padding: 6px 8px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink); font: inherit; font-size: var(--text-sm); line-height: 1.45; text-align: left; width: 100%; }
button.ghr-tl { cursor: pointer; }
button.ghr-tl:hover { background: var(--surface-2); }
.ghr-tl-now, button.ghr-tl-now:hover { background: var(--accent-soft); }
.ghr-tl-t { color: var(--ink-3); font-size: var(--text-xs); padding-top: 2px; }
.ghr-tl-who { font-weight: 700; font-size: var(--text-xs); padding-top: 1px; overflow: hidden; text-overflow: ellipsis; }
.ghr-who-rep { color: var(--accent-ink); }
.ghr-who-customer { color: var(--warn-ink); }
.ghr-who-other { color: var(--ink-3); }
.ghr-tl-x { overflow-wrap: anywhere; }

/* Phone: one column, 44px targets, the player stays at the top while the transcript scrolls under it. */
.ghr-layer-list .ghr-kind { min-height: 44px; }
.ghr-layer-list .ghr-search { min-height: 44px; }
.ghr-layer-list .ghr-line-sel { min-height: 44px; }
.ghr-phone .ghr-call { max-width: 100%; }
.ghr-phone .ghr-call .cp { position: sticky; top: var(--ghr-stick-h, 0px); z-index: 2; }
.ghr-phone .ghr-lines { max-height: none; overflow: visible; }
.ghr-phone .ghr-tl { grid-template-columns: 40px minmax(0, 1fr); min-height: 44px; font-size: var(--text-md); }
.ghr-phone .ghr-tl-who { grid-column: 2; }
.ghr-phone .ghr-tl-x { grid-column: 2; }
.ghr-phone .ghr-find-in { min-height: 44px; max-width: none; }
.ghr-phone .ghr-find-b { width: 44px; height: 44px; }
.ghr-phone .ghr-sum2 > summary, .ghr-phone .ghr-tx-lines > summary { min-height: 44px; }
.ghr-phone .ghr-step { grid-template-columns: 18px minmax(0, 1fr); }
.ghr-phone .ghr-step-box::after { inset: -12px; }
.ghr-phone .ghr-pick { margin-left: 0; }
.ghr-phone .ghr-link-btn { min-height: 40px; }
.ghr-phone .ghr-pick-opt { min-height: 44px; }
.ghr-phone .ghr-step-meta { grid-column: 2; white-space: normal; padding-top: 0; }
.ghr-phone .ghr-sum2-row { grid-template-columns: 64px minmax(0, 1fr); }
.ghr-phone .ghr-chip { min-height: 44px; padding: 0 14px; }

/* The web Inbox's thread column hosts the record (public/tools/inbox.html #ix-ghl-pane). */
.ix-ghl-pane { flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }

/* ── Polish from the live phone test (2026-11-05) ────────────────────────────────────────────────────────────────
   The thread's pages ("Show older" adds one above). */
.ghr-page { display: flex; flex-direction: column; }

/* The phone's top: the name and the customer bar stay in view while the record scrolls under them; Details opens the
   customer's cards in place (its own scroll past 45% of the screen). */
.ghr-stick { position: sticky; top: 0; z-index: 3; background: var(--bg); }
.ghr-phone .ghr-head { padding: 8px 12px; }
.ghr-custbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--border); }
.ghr-custbar .ghr-badge { font-size: var(--text-xs); padding: 2px 8px; }
.ghr-custbar-gap { flex: 1 1 0; }
.ghr-custbar .ds-btn { min-height: 44px; }
.ghr-details { max-height: 45vh; overflow-y: auto; padding: 8px 12px 2px; border-bottom: 1px solid var(--border); background: var(--bg); }
.ghr-details[hidden] { display: none; }

/* A call's plain bar until play is pressed (the shared player then takes its place, the same height). */
.ghr-pl { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg); }
.ghr-pl-play { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; background: var(--brand-royal); color: var(--surface);
  display: grid; place-items: center; cursor: pointer; }
.ghr-pl-bar { flex: 1 1 auto; min-width: 40px; height: 6px; border-radius: 3px; background: var(--border); }
.ghr-pl-time { font-weight: 700; font-size: var(--text-sm); white-space: nowrap; color: var(--ink-2); }
.ghr-pl-dl { width: 44px; height: 44px; flex: none; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface);
  color: var(--ink-2); display: grid; place-items: center; text-decoration: none; }
.ghr-pl button:focus-visible, .ghr-pl a:focus-visible { outline: none; box-shadow: var(--ring); }

/* The files someone sent. A photo's box is its own size (the thread never jumps as it loads); a video's too. */
.ghr-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; white-space: normal; }
.ghr-att-img { display: block; width: 180px; height: 180px; padding: 0; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.ghr-att-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ghr-att-media { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 100%; }
.ghr-att-video { display: block; width: 260px; height: 146px; max-width: 100%; border-radius: 10px; background: var(--surface-3); }
.ghr-att-audio { display: block; width: 260px; max-width: 100%; height: 40px; }
.ghr-att-file { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 10px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--accent-ink); font: inherit; font-size: var(--text-sm); font-weight: 700;
  text-decoration: none; cursor: pointer; }
.ghr-file-miss { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 8px; border: 1px dashed var(--border);
  border-radius: 8px; color: var(--ink-2); font-size: var(--text-xs); }
.ghr-phone .ghr-att-img { width: 160px; height: 160px; }
.ghr-phone .ghr-att-file { min-height: 44px; }

/* The copy bar under a call's player (Richard 2026-11-12): Copy summary, Copy transcript, Copy all. Small outlined buttons, the
   same family as the find buttons; a flash of "Copied" and back. Tokens only; 44px targets on the phone. */
.ghr-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ghr-act { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--text-xs); font-weight: 700; cursor: pointer; }
.ghr-act:hover { background: var(--surface-2); color: var(--ink); }
.ghr-act:focus-visible { outline: none; box-shadow: var(--ring); }
.ghr-act-ok, .ghr-act-ok:hover { background: var(--success-soft); border-color: var(--success-soft); color: var(--success-ink); }
/* Make job report: the card's one primary action (accent tokens, the same family as the chips). */
.ghr-act-report { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-soft); }
.ghr-act-report:hover { background: var(--accent-soft); color: var(--accent-ink); filter: brightness(0.97); }
.ghr-act[disabled] { opacity: 0.6; cursor: default; }
.ghr-phone .ghr-act { min-height: 44px; padding: 0 14px; font-size: var(--text-sm); justify-content: center; }
/* Three buttons do not fit one phone row: two across, and Copy all takes the full row under them (never one stranded). */
.ghr-phone .ghr-acts { display: grid; grid-template-columns: 1fr 1fr; }
.ghr-phone .ghr-act[data-ghr-copy="all"], .ghr-phone .ghr-act-report { grid-column: 1 / -1; }
/* A lone button (a call with only a summary or only a transcript: the status line is its one sibling) fills the row. */
.ghr-phone .ghr-act:first-child:nth-last-child(2) { grid-column: 1 / -1; }
/* The words under a call that has no audio or no transcript. */
.ghr-callnote { margin: 8px 2px 0; }
/* A list row's call summary: the outcome chip and the headline, one line. */
.ghr-sumline { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ghr-sumtxt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: var(--text-xs); }
