.bchat { --bchat-ink:#12232f; --bchat-paper:#f4f7f8; --bchat-blue:#174865; --bchat-edge:#c7d4dc; color:var(--bchat-ink); font: 15px/1.45 system-ui,sans-serif; }
.bchat *, .bchat *::before, .bchat *::after { box-sizing:border-box; }
.bchat h1,.bchat h2,.bchat h3 { color:inherit; margin:0 0 .65rem; line-height:1.2; text-transform:none; letter-spacing:normal; }
.bchat h1 { font-size:1.65rem; }
.bchat h2 { font-size:1.23rem; }
.bchat h3 { font-size:1.05rem; margin-top:.75rem; }
.bchat p { margin:.35rem 0; }
.bchat button,.bchat input,.bchat textarea { font:inherit; min-width:0; max-width:100%; }
.bchat button { min-height:38px; border:1px solid var(--bchat-edge); border-radius:6px; background:#fff; color:var(--bchat-ink); padding:.35rem .65rem; cursor:pointer; text-align:start; }
.bchat button:hover { background:var(--bchat-paper); }
.bchat button:focus-visible,.bchat input:focus-visible,.bchat textarea:focus-visible,.bchat summary:focus-visible { outline:3px solid #1176a2; outline-offset:2px; }
.bchat button:disabled { opacity:.55; cursor:wait; }
.bchat input:not([type=file]),.bchat textarea { width:100%; border:1px solid var(--bchat-edge); background:white; color:inherit; border-radius:6px; padding:.45rem; }
.bchat textarea { display:block; resize:vertical; min-height:58px; }
.bchat label { display:block; font-weight:550; }
.bchat [hidden] { display:none!important; }
.bchat-widget { --bchat-right:max(16px,env(safe-area-inset-right)); --bchat-bottom:max(18px,env(safe-area-inset-bottom)); }
.bchat-widget .bchat-launch { position:fixed; right:var(--bchat-right); bottom:var(--bchat-bottom); z-index:9981; background:var(--bchat-blue); color:white; border:0; min-height:46px; }
.bchat-widget .bchat-launch-highlight { transform:scale(1.08); transform-origin:right bottom; }
.bchat-invitation { position:fixed; right:var(--bchat-right); bottom:calc(var(--bchat-bottom) + 62px); z-index:9981; display:flex; align-items:center; gap:4px; max-width:calc(100vw - var(--bchat-right) - max(16px,env(safe-area-inset-left))); padding:4px; background:#fff; border:1px solid var(--bchat-edge); border-radius:10px; box-shadow:0 4px 18px rgb(12 26 38 / 18%); }
.bchat-invitation .bchat-invitation-link { border:0; color:var(--bchat-blue); font-weight:600; }
.bchat-invitation .bchat-invitation-close { flex:none; min-width:44px; min-height:44px; padding:0; text-align:center; font-size:22px; }
.bchat-invitation-hint { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media (prefers-reduced-motion:no-preference) { .bchat-widget .bchat-launch { transition:transform .2s ease-out; } }
@media (max-width:767px) {
  .bchat-widget { --bchat-bottom:calc(var(--bchat-cart-offset,0px) + max(18px,env(safe-area-inset-bottom))); }
}
.bchat-dialog { width:min(440px,calc(100vw - 24px)); max-width:none; max-height:min(720px,calc(100dvh - 24px)); margin:auto 12px 12px auto; color:var(--bchat-ink); border:1px solid var(--bchat-edge); border-radius:10px; background:white; overflow:auto; padding:14px; }
.bchat-dialog::backdrop { background:rgb(12 26 38 / 52%); }
.bchat-bar { display:flex; gap:.6rem; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.bchat-dialog h2,.bchat-bar h1 { margin-bottom:0; }
.bchat-thread { display:flex; flex-direction:column; gap:.5rem; min-width:0; }
.bchat-thread-title { margin-top:.65rem!important; }
.bchat-messages { list-style:none; padding:.5rem; margin:0; background:var(--bchat-paper); border-radius:7px; max-height:47vh; min-height:70px; overflow:auto; }
.bchat-messages li { max-width:92%; padding:.4rem .65rem; margin:.3rem .15rem; border-radius:7px; background:white; white-space:pre-wrap; overflow-wrap:anywhere; }
.bchat-messages .bchat-reply { background:#d8ecf7; margin-left:auto; }
.bchat-messages img { display:block; width:auto; max-width:100%; max-height:220px; margin-top:.35rem; }
.bchat-time { font-size:12px; }
.bchat .bchat-source { margin:.2rem 0; font-size:.82rem; color:var(--bchat-blue); overflow-wrap:anywhere; }
.bchat-source a { color:inherit; text-decoration:underline; }
.bchat-source a:focus-visible { outline:3px solid #1176a2; outline-offset:2px; }
.bchat-compose,.bchat-form,.bchat-search { display:grid; gap:.45rem; }
.bchat-compose button[type=submit] { background:var(--bchat-blue); color:white; justify-self:end; }
.bchat-compose label { font-size:.83rem; }
.bchat-compose input[type=file] { display:block; }
.bchat-status { min-height:1.35em; color:#714100; }
.bchat-manager { max-width:1560px; margin:auto; padding:clamp(12px,2vw,28px); }
.bchat-sections { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.85rem; }
.bchat-sections button[aria-pressed=true] { background:var(--bchat-blue); color:white; }
.bchat-staff { max-width:820px; }
.bchat-staff .bchat-messages { min-height:12rem; }
.bchat-staff .bchat-messages p { margin-bottom:0; }
.bchat-workspace { display:grid; grid-template-columns:minmax(210px,1fr) minmax(280px,2fr) minmax(230px,1fr); gap:16px; }
.bchat-sidebar,.bchat-card { padding:.65rem; border:1px solid var(--bchat-edge); border-radius:7px; min-width:0; }
.bchat-thread-origin { padding:.45rem .6rem; margin-bottom:.75rem; background:var(--bchat-paper); border-radius:6px; }
.bchat-row,.bchat-more { display:block; width:100%; margin:.3rem 0; overflow-wrap:anywhere; }
.bchat-queue,.bchat-card-list,.bchat-notes { max-height:34vh; overflow:auto; }
.bchat-notes li { overflow-wrap:anywhere; }
.bchat-dialog summary { cursor:pointer; margin:.65rem 0; }
@media (max-width:820px) { .bchat-workspace { grid-template-columns:1fr; } }
@media (max-width:480px) {
  .bchat-dialog { margin:auto 8px 8px; width:calc(100vw - 16px); max-height:calc(100dvh - 16px); padding:10px; }
  .bchat button { min-height:44px; }
  .bchat-messages { max-height:40vh; }
}
