/* Site Builder — Chat, the Updates panel's first tab (public/bchat.js)
   The panel's own skin (.upc, updates.css): its head now carries the Claude
   panel's segmented pair (agents.css, .ag-tabs) — Chat | Updates — and with
   Chat up, the list of your chats (or the one open, ‹ Chats at its top left)
   takes the place of the queue, over the same composer. The conversation
   reads as Focus mode's does (focus.css): you in a sand bubble, Claude under
   its star. */

.upc-vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- the head: Chat | Updates, the line under it says what the tab is for ---- */
.upc-tabs { margin: 0 0 4px -1px; }
.upc-tabs .ag-tab svg { width: 13px; height: 13px; }
.upc-tabs .ag-tab .cl-star { margin: 0; color: var(--clay); }
.upc-tabs .ag-tab[data-tab="chat"][aria-selected="true"] svg { color: var(--clay); }
.upc-tabs .ag-tab:not([aria-selected="true"]) .cl-star { color: var(--cl-muted); }
.upc .upc-titles p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .upc-tabs .ag-tab svg { display: none; } .upc-tabs .ag-tab { padding: 0 11px; } }

/* ---- Chat up: the Updates tab's search, queue, composer and foot step aside ---- */
.upc.is-chat > :is(.upc-search, #upc-scroll, .upc-compose, .upc-foot) { display: none !important; }
.upc.is-chat:not(.sized-h) { height: min(640px, calc(100vh - 44px)); }
.ubc { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ubc[hidden] { display: none; }
.ubc .ubc-compose { padding-bottom: 12px; }
.ubc #ubc-msg { min-height: 44px; max-height: 30vh; }

/* one chat open: ‹ Chats at the top left, its title, Delete at the right */
.ubc-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px 0 9px; flex-shrink: 0; }
.ubc-bar[hidden] { display: none; }
.ubc-bar .ag-back { flex: none; }
.ubc-title { flex: 1; min-width: 0; font: 650 12.5px var(--sans); color: var(--cl-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ubc .ubc-del { margin: 0; }
.ubc .btn.icon.confirm { gap: 5px; padding: 4px 10px 4px 8px; background: #C03A31; border-color: transparent; color: #fff; font-size: 12px; }
.ubc .btn.icon.confirm:hover { background: #A8322A; }

/* the feed: your chats, or the conversation */
.ubc-feed { gap: 10px; }
.ubc .ubc-list .upc-e-text { padding: 0; border: none; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 6px; }
.ubc .ubc-list .upc-e-text b { display: flex; align-items: center; gap: 6px; }
.ubc .ubc-list .upc-e-text > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cl-muted); }
.ubc .ubc-list li { transition: background-color .16s var(--ease-out), border-color .16s var(--ease-out); }
.ubc .ubc-list li:hover { background: rgba(240, 238, 230, .7); }
.ubc .ubc-list li.busy { border-color: rgba(217, 119, 87, .4); }
.ubc-dot {
  flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--clay);
  box-shadow: 0 0 6px rgba(217, 119, 87, .7); animation: pulse 1.2s ease-in-out infinite;
}
.ubc-hint { margin: 2px 0 0; text-align: center; font-size: 11.5px; color: var(--cl-muted); }

.ubc-empty { margin: auto; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--cl-muted); font-size: 12.5px; line-height: 1.5; }
.ubc-empty > .cl-star { width: 24px; height: 24px; color: var(--clay); margin-bottom: 2px; }
.ubc-empty > b { font: 700 14px var(--sans); color: var(--cl-ink); }
.ubc-empty .upd-spin { width: 16px; height: 16px; color: var(--clay); }
.ubc-ideas { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px; }
.ubc-idea {
  all: unset; box-sizing: border-box; max-width: 100%; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  background: var(--cl-card); border: 1px solid var(--cl-line); box-shadow: var(--cl-rest);
  font: 500 12px/1.35 var(--sans); color: var(--cl-ink);
  transition: border-color .16s var(--ease-out), transform .32s var(--ease-spring);
}
.ubc-idea:hover { border-color: var(--clay); }
.ubc-idea:active { transform: scale(.97); transition-duration: .06s; }
.ubc-idea:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }

/* the conversation: Focus mode's (focus.css) — a site Claude names opens in the builder */
.ubc .md a.ubc-go { color: var(--clay); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ubc-dot { animation: none; } }
