
.cl-assist-abrir { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent, #6A2CFF); color: #fff; font: inherit; font-weight: 700; box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.25)); }
.cl-assist-abrir svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.cl-assist-abrir:focus-visible { outline: 3px solid var(--warn, #F0B46A); outline-offset: 2px; }
.cl-assist-aberto .cl-assist-abrir { display: none; }

body.lado-aberto .cl-assist-abrir { display: none !important; }
.cl-assist { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 61;
  width: min(400px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 32px)); display: flex; flex-direction: column;
  background: var(--surface, #fff); color: var(--ink, inherit); border: 1px solid var(--rule, #ddd); border-radius: 16px; box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,.3)); overflow: hidden; }
.cl-assist[hidden] { display: none; }
.cl-assist-cab { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--rule, #ddd); }
.cl-assist-cab > div { display: grid; flex: 1; min-width: 0; }
.cl-assist-cab > div span { font-size: .8rem; color: var(--muted, #666); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-assist-cab select { width: auto; max-width: 4.5rem; flex: none; min-height: 0; font: inherit; font-size: .8rem; padding: 2px 4px; border-radius: 6px; border: 1px solid var(--rule-strong, #bbb); background: var(--surface, #fff); color: inherit; }
.cl-assist-fechar { border: 0; background: transparent; color: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 2px 8px; border-radius: 8px; }
.cl-assist-fechar:hover, .cl-assist-fechar:focus-visible { background: var(--wash, #eee); }
.cl-assist-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.cl-assist-msg { max-width: 92%; padding: 8px 10px; border-radius: 12px; font-size: .88rem; line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; }
.cl-assist-clain { align-self: flex-start; background: var(--surface-2, #f3f3f6); }
.cl-assist-util { align-self: flex-start; background: var(--wash, #efe9ff); }
.cl-assist-alerta { align-self: flex-start; background: #fff4e5; color: #6b3d00; }
.cl-assist-pessoa { align-self: flex-end; background: var(--accent, #6A2CFF); color: #fff; }
.cl-assist-lista { margin: 4px 0; padding-left: 1.1rem; white-space: normal; }
.cl-assist-logo { display: block; max-width: 80px; max-height: 80px; margin-top: 6px; }
.cl-assist-botoes { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; }
.cl-assist-botoes:not(:empty) { padding-bottom: 8px; }
.cl-assist-form { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--rule, #ddd); }
.cl-assist-form textarea { flex: 1; min-width: 0; resize: none; min-height: 2.4rem; max-height: 7rem; font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--rule-strong, #bbb); background: var(--surface, #fff); color: inherit; }
.cl-assist-ic { flex: none; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--rule-strong, #bbb); background: var(--surface, #fff); color: inherit; cursor: pointer; }
.cl-assist-ic svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.cl-assist-ic.gravando { background: #B23A3A; color: #fff; border-color: #B23A3A; animation: cl-assist-pulso 1.2s infinite; }
@keyframes cl-assist-pulso { 50% { box-shadow: 0 0 0 4px rgba(178, 58, 58, .3); } }

.cl-assist-destaque { outline: 3px dashed var(--accent, #6A2CFF); outline-offset: 3px; border-radius: 8px; background: var(--wash, #efe9ff); transition: background .3s; }
.cl-assist-aplicado { outline: 3px solid #2E7D5B; outline-offset: 3px; border-radius: 8px; transition: outline-color 1s; }
@media (max-width: 600px) {
  .cl-assist { right: 0; left: 0; bottom: 0; width: 100%; height: min(78dvh, 620px); border-radius: 16px 16px 0 0; }
  .cl-assist-abrir { padding: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) { .cl-assist-ic.gravando { animation: none; } }
