.bba { --bba-blue: #1E4FD8; --bba-deep: #0B2E6F; --bba-ink: #0A1430; --bba-slate: #5B6478; --bba-line: #E0E5EE; --bba-mist: #F2F4F8; position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 99990; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Ethiopic", "Nyala", sans-serif; font-size: 15px; line-height: 1.45; color: var(--bba-ink); }
.bba *, .bba *::before { box-sizing: border-box; }
.bba-fab { display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 28px; background: linear-gradient(135deg, #0B2E6F, #1E4FD8 60%, #1A9E8A); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 12px 30px rgba(11,46,111,0.35); transition: transform .2s ease, box-shadow .2s ease; }
.bba-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(11,46,111,0.45); }
.bba-fab svg { width: 24px; height: 24px; }
.bba[data-open="true"] .bba-fab { display: none; }
.bba-panel { position: absolute; right: 0; bottom: 0; width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100vh - 32px)); height: min(640px, calc(100dvh - 32px)); display: none; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 70px rgba(6,20,60,0.32); border: 1px solid var(--bba-line); }
.bba[data-open="true"] .bba-panel { display: flex; animation: bba-in .22s ease both; }
@keyframes bba-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.bba-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; background: linear-gradient(135deg, #071D4A, #0B2E6F 55%, #1E4FD8); color: #fff; }
.bba-logo { width: 36px; height: 36px; border-radius: 10px; background: #fff; flex: none; }
.bba-titles { flex: 1; min-width: 0; }
.bba-title { display: block; font-size: 15px; }
.bba-sub { display: block; font-size: 11.5px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bba-langs { display: flex; background: rgba(255,255,255,.12); border-radius: 999px; padding: 2px; }
.bba-langs button { border: 0; background: transparent; color: #fff; font: inherit; font-size: 11.5px; font-weight: 700; padding: 4px 8px; border-radius: 999px; cursor: pointer; opacity: .75; }
.bba-langs button[aria-pressed="true"] { background: #fff; color: var(--bba-deep); opacity: 1; }
.bba-x { border: 0; background: rgba(255,255,255,.12); color: #fff; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; flex: none; }
.bba-x svg { width: 16px; height: 16px; }
.bba-contact { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; border-bottom: 1px solid var(--bba-line); scrollbar-width: none; }
.bba-contact::-webkit-scrollbar { display: none; }
.bba-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 6px 10px; border-radius: 999px; background: var(--bba-mist); color: var(--bba-deep); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.bba-chip svg { width: 15px; height: 15px; }
.bba-chip.is-wa { background: #E3F7EA; color: #0E7A3E; }
.bba-chip.is-tg { background: #E3F1FB; color: #1A6FA8; }
.bba-log { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; background: #FAFBFD; }
.bba-msg { display: flex; flex-direction: column; max-width: 86%; }
.bba-msg.is-user { align-self: flex-end; align-items: flex-end; }
.bba-bubble { padding: 9px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--bba-line); word-wrap: break-word; overflow-wrap: anywhere; }
.bba-bubble a { color: var(--bba-blue); }
.bba-msg.is-user .bba-bubble { background: var(--bba-blue); color: #fff; border-color: transparent; border-bottom-right-radius: 6px; }
.bba-msg.is-assistant .bba-bubble { border-bottom-left-radius: 6px; }
.bba-msg.is-agent .bba-bubble { background: #E2F5EE; border-color: #BDE7D3; border-bottom-left-radius: 6px; }
.bba-who { font-size: 11px; font-weight: 700; color: #0E7A4F; margin: 0 0 2px 4px; }
.bba-typing .bba-bubble { display: inline-flex; gap: 4px; padding: 12px; }
.bba-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9AA6BF; animation: bba-dot 1s infinite ease-in-out; }
.bba-typing i:nth-child(2) { animation-delay: .15s; } .bba-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bba-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.bba-quick { display: flex; gap: 6px; padding: 8px 12px 0; overflow-x: auto; scrollbar-width: none; }
.bba-quick::-webkit-scrollbar { display: none; }
.bba-q { flex: none; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #C9D6F5; background: #fff; color: var(--bba-deep); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.bba-q svg { width: 14px; height: 14px; }
.bba-q.is-human { border-color: #BDE7D3; color: #0E7A4F; }
.bba-lead { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 12px 0; }
.bba-lead[hidden] { display: none; }
.bba-lead input, .bba-lead textarea { width: 100%; border: 1px solid var(--bba-line); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13.5px; background: #fff; color: var(--bba-ink); }
.bba-lead textarea, .bba-lead .bba-primary { grid-column: 1 / -1; }
.bba-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; }
.bba-primary { border: 0; border-radius: 10px; padding: 10px; background: #22A86B; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.bba-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 6px; }
.bba-input { flex: 1; resize: none; border: 1px solid var(--bba-line); border-radius: 14px; padding: 10px 12px; font: inherit; font-size: 15px; max-height: 120px; background: #fff; color: var(--bba-ink); }
.bba-input:focus, .bba-lead input:focus, .bba-lead textarea:focus { outline: 2px solid rgba(30,79,216,.35); border-color: var(--bba-blue); }
.bba-send { flex: none; width: 44px; height: 44px; border: 0; border-radius: 14px; background: var(--bba-blue); color: #fff; display: grid; place-items: center; cursor: pointer; }
.bba-send svg { width: 20px; height: 20px; }
.bba-note { margin: 0; padding: 0 14px 10px; font-size: 11px; color: var(--bba-slate); }
@media (max-width: 520px) {
  .bba-fab-label { display: none; }
  .bba-fab { width: 56px; padding: 0; justify-content: center; }
  .bba[data-open="true"] { left: 0; right: 0; bottom: 0; top: 0; }
  .bba-panel { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; border: 0; }
  .bba-input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .bba-panel, .bba-typing i { animation: none !important; } }
