/* 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. */

.ghr-list { display: flex; flex-direction: column; gap: 6px; padding: 6px 4px; }
.ghr-searchrow .ghr-search { width: 100%; }
.ghr-note { margin: 2px 4px 6px; color: var(--ink-2); font-size: var(--text-xs); }
.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 { 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); }
.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-rec > .ghr-note { margin: 8px 14px 4px; }
.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); }
.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 cards follow the thread. */
.ghr-phone .ghr-body { padding: 0 12px 8px; }
.ghr-phone .ghr-msg { max-width: 86%; }
.ghr-phone .ghr-ev { max-width: 100%; }
.ghr-side-phone { width: auto; padding: 0 12px 16px; }
@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; }

/* 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; }
