/* Estilos com escopo exclusivo: nenhum seletor global do catálogo é alterado. */
#bm-chat-widget{--ink:#17313b;--muted:#70818a;--line:#e1e9ea;--bg:#f4f7f7;--accent:#168b83;position:fixed;right:22px;bottom:22px;z-index:2147482000;font-family:Arial,sans-serif;color:var(--ink)}
#bm-chat-widget *{box-sizing:border-box}
#bm-chat-launcher{display:flex;align-items:center;gap:10px;border:0;border-radius:999px;background:var(--ink);color:#fff;padding:14px 20px;box-shadow:0 10px 30px #102b3733;font:600 14px Arial,sans-serif;cursor:pointer}
.bm-chat-launcher-dot{width:9px;height:9px;border-radius:50%;background:#55d5b2;box-shadow:0 0 0 4px #55d5b222}
#bm-chat-panel{position:absolute;right:0;bottom:62px;width:min(370px,calc(100vw - 28px));height:min(560px,calc(100dvh - 110px));min-height:420px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 18px 60px #102b3733;overflow:hidden;display:flex;flex-direction:column}
#bm-chat-panel[hidden],#bm-chat-compose[hidden],#bm-chat-start[hidden],#bm-chat-notice[hidden],#bm-chat-attachment-preview[hidden]{display:none}
.bm-chat-header{display:flex;align-items:center;justify-content:space-between;padding:15px 17px;background:var(--ink);color:#fff}
.bm-chat-brand{display:flex;align-items:center;gap:11px}.bm-chat-brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#ffffff1c;font-weight:700;font-size:13px}.bm-chat-brand strong,.bm-chat-brand small{display:block}.bm-chat-brand strong{font-size:14px}.bm-chat-brand small{margin-top:3px;color:#c3d4d7;font-size:11px}
#bm-chat-close{width:32px;height:32px;border:0;border-radius:50%;background:#ffffff18;color:#fff;font-size:24px;cursor:pointer}
.bm-chat-thread{flex:1;overflow:auto;padding:16px;background:var(--bg);display:flex;flex-direction:column;gap:10px}
.bm-chat-welcome{align-self:flex-start;max-width:88%;padding:13px 14px;background:#fff;border:1px solid var(--line);border-radius:4px 14px 14px 14px;font-size:13px;line-height:1.45}.bm-chat-welcome p{margin:5px 0 0;color:var(--muted)}
.bm-chat-bubble{max-width:86%;padding:10px 12px;border-radius:14px;font-size:13px;line-height:1.45;overflow-wrap:anywhere}.bm-chat-bubble.client{align-self:flex-end;background:#dff4ee;border-bottom-right-radius:4px}.bm-chat-bubble.staff{align-self:flex-start;background:#fff;border:1px solid var(--line);border-bottom-left-radius:4px}.bm-chat-bubble time{display:block;text-align:right;color:#819096;font-size:10px;margin-top:4px}.bm-chat-bubble img{display:block;max-width:100%;max-height:200px;border-radius:8px}
.bm-chat-start{padding:14px 16px 16px;display:grid;gap:10px;background:#fff}.bm-chat-start label{display:grid;gap:5px;font-size:11px;font-weight:700;color:#52656d}.bm-chat-start input{width:100%;height:40px;padding:0 11px;border:1px solid var(--line);border-radius:9px;font:13px Arial,sans-serif;outline:none}.bm-chat-start input:focus,.bm-chat-compose textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #168b8318}.bm-chat-start>button{height:42px;border:0;border-radius:10px;background:var(--accent);color:#fff;font-weight:700;cursor:pointer}.bm-chat-start>small{text-align:center;color:var(--muted);font-size:10px}
.bm-chat-compose{display:flex;align-items:flex-end;gap:8px;padding:11px 12px;border-top:1px solid var(--line);background:#fff}.bm-chat-file,.bm-chat-compose>button{flex:0 0 36px;width:36px;height:36px;display:grid;place-items:center;border:0;border-radius:50%;background:#eaf5f3;color:#116c67;font-size:22px;cursor:pointer}.bm-chat-compose textarea{flex:1;min-width:0;max-height:95px;resize:none;padding:10px 11px;border:1px solid var(--line);border-radius:12px;font:13px Arial,sans-serif;outline:none}.bm-chat-compose>button{background:var(--accent);color:#fff;font-size:17px}
.bm-chat-notice{padding:8px 12px;background:#fff8e8;color:#805b18;font-size:11px}.bm-chat-notice.error{background:#fff0f0;color:#9b3333}.bm-chat-attachment-preview{padding:8px 12px;border-top:1px solid var(--line);font-size:11px;display:flex;align-items:center;justify-content:space-between}.bm-chat-attachment-preview button{border:0;background:none;color:#a33;cursor:pointer}
@media(max-width:600px){#bm-chat-widget{right:12px;bottom:12px}#bm-chat-panel{position:fixed;right:12px;bottom:70px;width:calc(100vw - 24px);height:min(620px,calc(100dvh - 92px));min-height:380px;border-radius:16px}#bm-chat-launcher{padding:12px 16px}}

/* Preserva o comportamento nativo de hidden mesmo com os layouts flex/grid. */
#bm-chat-widget [hidden]{display:none!important}

/* Ajustes de usabilidade do botão e do painel em telas pequenas. */
#bm-chat-launcher{width:58px;height:58px;padding:0;justify-content:center;gap:0}
#bm-chat-launcher .bm-chat-launcher-dot{display:none}
#bm-chat-launcher .bm-chat-launcher-icon{display:block;width:27px;height:27px;flex:none}
#bm-chat-panel{min-height:0}
#bm-chat-start input,#bm-chat-compose textarea{font-size:16px}
@media(max-width:600px){
  #bm-chat-widget{right:12px;bottom:12px}
  #bm-chat-launcher{width:58px;height:58px;padding:0}
  #bm-chat-panel{position:fixed;right:10px;bottom:82px;width:calc(100vw - 20px);height:calc(100vh - 102px);height:calc(100dvh - 102px);min-height:0;max-height:680px;border-radius:16px}
  .bm-chat-header{padding:13px 15px}
  .bm-chat-thread{min-height:0;padding:12px}
  .bm-chat-start{gap:12px;padding:12px}
  .bm-chat-start input{height:44px;font-size:16px}
  .bm-chat-compose{padding:10px}
  .bm-chat-compose textarea{font-size:16px;min-height:42px}
}

#bm-chat-home{padding:16px;display:grid;gap:10px;background:#fff}
#bm-chat-home p{margin:0 0 4px;color:#52656d;font-size:13px;text-align:center}
#bm-chat-home button{height:44px;border:0;border-radius:10px;background:var(--accent);color:#fff;font-weight:700;cursor:pointer}
#bm-chat-home button.secondary{background:#eaf5f3;color:#116c67}
.bm-chat-back{height:34px;border:0;background:transparent;color:#66777d;font-size:12px;cursor:pointer}
#bm-chat-widget [hidden]{display:none!important}

/* Identidade visual do catálogo: botão de conversa em tom terracota. */
#bm-chat-launcher{background:#a65f1b;color:#fff}
#bm-chat-launcher:hover{background:#8f5218}

/* Painel um pouco maior para melhorar a leitura, sem alterar o layout do catálogo. */
@media(min-width:601px){
  #bm-chat-panel{width:min(420px,calc(100vw - 28px));height:min(620px,calc(100dvh - 100px))}
}
@media(max-width:600px){
  #bm-chat-panel{right:8px;width:calc(100vw - 16px);height:calc(100vh - 92px);height:calc(100dvh - 92px)}
}


