/* Faces and glimpses (faces.js, docs/CONSOLE-REDESIGN.md §3.4, §4.2; step 10). The strip of faces across the top of
   Conversations on a phone, and the glimpse a long press opens: a bottom sheet on a phone, a card beside the face on a
   wide screen (the messaging rail's, step 11). Flat: hairlines; the glimpse is the only shadowed thing, being a floating
   one (--pop-bg, --elev-2). Tokens only (docs/THEMES.md). */

/* ---------- the strip ---------- */
.cv-faces { display: none; }
@media (max-width: 780px) {
  .cv-faces { display: block; flex: none; border-bottom: var(--hair, 1px solid var(--line)); }
  .cv-faces:empty { display: none; }
}
.fc-strip { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 6px 14px 2px; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; }
.fc-strip::-webkit-scrollbar { display: none; }
.fc { flex: none; width: 58px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 4px 0 2px; border: 0; background: none;
  color: var(--text-2); font: inherit; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.fc-av { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--sans); letter-spacing: .02em;
  background: var(--ink-3); color: var(--text); }
.fc-av.k-agent { border-radius: 10px; font-family: var(--mono); font-weight: 500; }
.fc-av.k-group { font-size: 17px; }
/* a ring: this one needs you (a question, an owed reply, unread words) */
.fc.needs .fc-av { box-shadow: 0 0 0 2px var(--content-bg), 0 0 0 4px var(--canopy); }
.fc-n { position: absolute; top: -5px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center;
  font: 700 10px/1 var(--sans); font-style: normal; font-variant-numeric: tabular-nums; background: var(--canopy); color: var(--canopy-ink); }
.fc-dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--content-bg); }
.fc-ch { position: absolute; right: -5px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  background: var(--content-bg); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.fc-ch svg { width: 10px; height: 10px; display: block; }
.fc-l { max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; line-height: 1.2; }
.fc:focus-visible { outline: 0; }
.fc:focus-visible .fc-av { outline: var(--focus-w, 2px) solid var(--focus); outline-offset: 5px; }
.fc-hint { margin: 0; padding: 0 14px 8px; font-size: 11.5px; }

/* ---------- the glimpse ---------- */
.fc-scrim { position: fixed; inset: 0; z-index: var(--z-glimpse); background: var(--scrim); }
.fc-glimpse { position: fixed; z-index: calc(var(--z-glimpse) + 1); display: flex; flex-direction: column; overflow: hidden; background: var(--pop-bg); color: var(--text); box-shadow: var(--elev-2); }
.fc-glimpse.sheet { left: 0; right: 0; bottom: 0; max-height: 84dvh; border-radius: 14px 14px 0 0; padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.fc-glimpse.card { width: min(360px, calc(100vw - 16px)); max-height: min(580px, calc(100vh - 16px)); max-height: min(580px, calc(100dvh - 16px)); border-radius: var(--content-radius); }
.fc-grip { width: 36px; height: 4px; border-radius: 2px; margin: 8px auto 0; flex: none; background: var(--line-2); }
.fc-glimpse.card .fc-grip { display: none; }
.fc-gh { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px 14px; border-bottom: var(--hair, 1px solid var(--line)); flex: none; }
.fc-gh .fc-av { width: 36px; height: 36px; font-size: 12px; }
.fc-gt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fc-gt b, .fc-gt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-gt span { font-size: 12px; }
.fc-x { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--text-2); }
.fc-x svg { width: 17px; height: 17px; }
/* Pin the face (§2.2), and taking over an agent (§4.6): a hairline note, no box. */
.fc-pin { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; color: var(--text-2); border-radius: 8px; }
.fc-pin svg { width: 16px; height: 16px; }
.fc-pin.on { color: var(--accent); }
.fc-hold { font-size: 12px; margin: 8px 0 0 !important; padding: 6px 0; border-top: var(--hair, 1px solid var(--line)); color: var(--text-2); }
.fc-hold.mine { color: var(--text); }
.fc-take { margin-top: 0; }
/* The foot: actions that must stay reachable (an agent's Take over / Hand back), pinned under the scrolling body. */
.fc-gf { flex: none; padding: 8px 14px 10px; border-top: var(--hair, 1px solid var(--line)); }
.fc-gf[hidden] { display: none; }
.fc-gb { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 14px 14px; }
.fc-gb p { margin: 0; }
.fc-task { font-size: 14.5px; overflow-wrap: anywhere; }
.fc-step { font-size: 12.5px; margin-top: 2px !important; }
.fc-screen { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; margin: 8px 0 !important; }
.fc-screen svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.fc-lines { margin: 0; padding: 8px 10px; border-radius: 6px; background: var(--sunk); font: 12px/1.45 var(--mono); max-height: 10em; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.fc-who { font-size: 12.5px; margin-bottom: 8px !important; }
.fc-owed { color: var(--warn); }
.fc-msgs { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 8px; }
.fc-msg { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.fc-msg > span { display: block; font-size: 11.5px; margin-bottom: 1px; }
.fc-msg.ours { padding-left: 10px; border-left: 2px solid var(--line-2); }
.fc-note { font-size: 12px; margin: 4px 0 !important; }
.fc-held { border-left: 2px solid var(--warn); padding-left: 10px; margin: 10px 0; }
.fc-held blockquote { margin: 6px 0; overflow-wrap: anywhere; }
.fc-reply { border-top: var(--hair, 1px solid var(--line)); margin-top: 10px; padding-top: 10px; }
.fc-reply textarea { display: block; width: 100%; box-sizing: border-box; resize: vertical; min-height: 44px; padding: 8px 10px; border: 1px solid var(--control); border-radius: 6px;
  background: var(--ink-2); font: 15px/1.4 var(--sans); }
.fc-reply textarea:disabled, .fc-acts .btn:disabled { opacity: .5; cursor: not-allowed; }
.fc-ghost { margin: 6px 0 0 !important; font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.fc-ghost kbd { font-size: 10.5px; }
.fc-sug { color: var(--canopy-2); font-weight: 600; }
.fc-acts { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.fc-acts .sp, .fc-why { flex: 1; min-width: 0; }
.fc-why { font-size: 12px; }
@media (max-width: 780px) {
  .fc-reply textarea { font-size: 16px; } /* iOS doesn't zoom into a 16 px field */
  .fc-acts .btn, .fc-gh .btn { min-height: 40px; }
  .fc-x, .fc-pin { width: 44px; height: 44px; }
}

/* ---------- Settings: a page's own pages as tabs under its heading (Channels, Billing & usage) ---------- */
.set-tabs { margin: 0 0 18px; }
.fc-still { margin: 8px 0; border-radius: 6px; overflow: hidden; font-size: 12px; }
.fc-still img { border-radius: 6px; }
/* In a short window the picture gives way first, so the lines and Instruct need less scrolling (its shape is kept). */
.fc-still .gl-still-img { width: auto; max-height: 34vh; }
/* glimpse-still.js draws its <img> with an inline display; until a picture arrives it is [hidden] and must not show its alt text */
.fc-still .gl-still-img[hidden] { display: none !important; }
