/* The chat (apps/workspace/chat.js): the thread's extra pieces on top of ws.css's messages, the composer, the palette. */
.bcc { padding-bottom: 6px; }
.bcc-empty { display: grid; place-items: center; gap: 10px; padding: 40px 0; color: var(--bc-ink-3); font-size: 14px; }
.bcc-m .m-t + .pt { margin-top: 10px; }
.m--you.is-sending .m-t { opacity: .65; }

.bcc-stage { display: inline-flex; align-items: center; gap: 10px; margin: 8px 0 0; font-size: 13px; color: var(--bc-ink-3); }
.bcc-fail { margin: 8px 0 0; font-size: 13px; color: #8a1d33; }
.bcc-fail button { margin-left: 6px; border: 0; background: none; padding: 0; font: inherit; font-weight: 650; color: var(--bc-plum); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.bcc-rc { font-size: 11.5px; font-weight: 500; color: var(--bc-ink-3); font-variant-numeric: tabular-nums; opacity: .8; }
.bcc-rc::before { content: '· '; }


.bcc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bcc-chip { padding: 8px 14px; border-radius: 999px; border: 0; background: #fff; box-shadow: 0 0 0 1px rgba(74, 29, 87, .18); font: inherit; font-size: 13.5px; font-weight: 600; color: var(--bc-plum); cursor: pointer; }
.bcc-chip:hover { background: var(--bc-plum-tint); }
.bcc-chip:focus-visible, .bcc-pal-i:focus-visible { outline: 2px solid var(--bc-focus); outline-offset: 2px; }

#bccCmp, .bcc-cmp { flex: none; }
.bcc-form .cmp textarea { min-height: 40px; }
.bcc-form { position: relative; flex: none; padding: 6px 24px 20px; }
.bcc-co { flex: none; align-self: center; max-width: 34%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 5px 10px; border-radius: 999px; background: var(--bc-plum-tint); color: var(--bc-plum); font-size: 12px; font-weight: 600; }
.bcc-stop { background: var(--bc-ink-2); }
.bcc-stop svg { width: 16px; height: 16px; fill: #fff; }
.cmp-send svg { width: 19px; height: 19px; }

.bcc-pal { position: absolute; left: 24px; right: 24px; bottom: calc(100% - 2px); max-width: 740px; margin: 0 auto; padding: 8px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 16, 38, .08), 0 18px 40px -20px rgba(74, 29, 87, .45); z-index: 5; }
.bcc-pal-h { margin: 2px 8px 6px; font-size: 11.5px; font-weight: 700; color: var(--bc-ink-3); letter-spacing: .02em; }
.bcc-pal-i { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: none; font: inherit; text-align: left; cursor: pointer; }
.bcc-pal-i b { font-size: 14px; font-weight: 600; color: var(--bc-ink); }
.bcc-pal-i small { font-size: 12px; color: var(--bc-ink-3); }
.bcc-pal-i.on, .bcc-pal-i:hover { background: var(--bc-plum-tint); }
.bcc-pal-none { margin: 4px 8px 6px; font-size: 13px; color: var(--bc-ink-3); }

@keyframes bcc-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.shake { animation: bcc-shake .3s; }
@media (prefers-reduced-motion: reduce) { .shake { animation: none; } .bcc-rc { transition: none; } }

/* in the app rail: narrow and compact */
.bcc--compact .m { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; margin-top: 16px; }
.bcc--compact .m-face { width: 28px; height: 28px; }
.bcc--compact .m--you { grid-template-columns: minmax(0, 1fr); }
.bcc--compact .m--you .m-b { max-width: 88%; }
.bcc--compact .m-t { font-size: 14px; }
.bcc--compact .pt-list, .bcc--compact .pt-record, .bcc--compact .pt-needs, .bcc--compact .pt-q { padding: 10px; }
.bcc--compact .pt-list table { font-size: 12.5px; }
.bcc--compact .pt-record dl, .bcc--compact .pt-qf { grid-template-columns: 1fr 1fr; }
.rl-cmp .bcc-form { padding: 6px 10px 10px; }
.rl-cmp .bcc-pal { left: 10px; right: 10px; }
.rl-cmp .cmp { border-radius: 20px; }

@media (max-width: 520px) {
  .bcc-form { padding: 6px 12px 12px; }
  .bcc-co { display: none; }
  .bcc-pal { left: 12px; right: 12px; }
}

/* the language picker (ws.js langPicker) and the note while a locale's screens are not translated */
.lg-q { width: 100%; margin: 4px 0 6px; padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(31, 16, 38, .14); font: inherit; font-size: 15px; }
.lg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; max-height: 42vh; overflow-y: auto; padding: 2px; }
.lg-i { display: grid; gap: 1px; justify-items: start; padding: 9px 12px; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px rgba(31, 16, 38, .07); font: inherit; text-align: start; cursor: pointer; }
.lg-i:hover { box-shadow: 0 0 0 1px rgba(74, 29, 87, .3); }
.lg-i.on { box-shadow: 0 0 0 2px var(--bc-plum); }
.lg-i:focus-visible { outline: 2px solid var(--bc-focus); outline-offset: 2px; }
.lg-i b { font-size: 14.5px; font-weight: 650; color: var(--bc-ink); }
.lg-i small { font-size: 12px; color: var(--bc-ink-3); }
.lg-st { font-style: normal; font-size: 11px; font-weight: 600; margin-top: 3px; padding: 1px 7px; border-radius: 999px; }
.lg-st--ready { background: var(--bc-sage-tint); color: var(--bc-sage); }
.lg-st--partial { background: #F4EDDD; color: #7A5A16; }
.lg-st--formats { background: rgba(31, 16, 38, .05); color: var(--bc-ink-3); }
.lang-note { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 18px; font-size: 13px; color: #6b4f12; background: #F4EDDD; border-radius: 18px 18px 0 0; }
.lang-note .bc-icon { width: 16px; height: 16px; flex: none; }
.lang-note span { flex: 1; }
.lang-note button { border: 0; background: none; font: inherit; font-weight: 650; color: var(--bc-plum); cursor: pointer; }
.me-lang { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.me-lang .bc-btn { margin-inline-start: auto; }

/* Wide, with the reading kept narrow: the column grows to 1040 px when the window allows, so cards and tables get
   room, while prose stays at a readable line (≈72 characters) and the question bubble never spans the screen. */
.col:has(> #bccThread) { max-width: 1040px; }
#bccCmp .cmp, #bccCmp .bcc-pal { max-width: 984px; }
.bcc .m--a .m-t { max-width: 72ch; }
.bcc .m--you .m-b { max-width: min(72ch, 78%); }

/* One turn = the question and its answer. A question starts a new turn: space and a hairline above it, and the
   answer sits close under it. The question is tinted, so it never reads as one more white card. */
.bcc .m--you .m-t { background: var(--bc-plum-tint); box-shadow: none; color: var(--bc-ink); }
.bcc .m--a + .m--you { position: relative; margin-top: 48px; }
.bcc .m--a + .m--you::before { content: ""; position: absolute; left: 50px; right: 0; top: -24px; height: 1px; background: rgba(31, 16, 38, .07); }
.bcc .m--you + .m--a { margin-top: 12px; }
.bcc--compact .m--a + .m--you { margin-top: 28px; }
.bcc--compact .m--a + .m--you::before { left: 0; top: -14px; }
@media (max-width: 520px) { .bcc .m--you .m-b { max-width: 90%; } }
