.dbi-chat-btn{position:fixed;right:1.2rem;bottom:5.4rem;z-index:9998;width:3.6rem;height:3.6rem;border:none;border-radius:50%;padding:0;background:linear-gradient(135deg,#0ea5e9,#6366f1);display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 .5rem 2rem rgba(99,102,241,.35);cursor:pointer;transition:transform .2s;animation:dbiChatPulse 2.5s ease-in-out infinite}
.dbi-chat-btn:hover{transform:scale(1.08)}
.dbi-chat-btn img.dbi-icon-bot{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
.dbi-chat-btn svg.dbi-icon-close{width:1.6rem;height:1.6rem}
@keyframes dbiChatPulse{0%,100%{box-shadow:0 .5rem 2rem rgba(99,102,241,.35)}50%{box-shadow:0 .5rem 2rem rgba(99,102,241,.15),0 0 0 .6rem rgba(99,102,241,.08)}}
.dbi-chat-btn[data-open="true"]{animation:none}
.dbi-chat-btn[data-open="true"] .dbi-icon-bot{display:none}
.dbi-chat-btn[data-open="true"] .dbi-icon-close{display:block}
.dbi-icon-close{display:none}

.dbi-chat-panel{position:fixed;right:1.2rem;bottom:9.4rem;z-index:9999;width:min(92vw,720px);height:min(70vh,520px);background:#fff;border-radius:1.2rem;box-shadow:0 1.5rem 4rem rgba(15,23,42,.25);display:flex;flex-direction:column;overflow:hidden;font-family:'Inter',system-ui,sans-serif;opacity:0;transform:translateY(1rem) scale(.97);pointer-events:none;transition:opacity .2s,transform .2s}
.dbi-chat-panel[data-open="true"]{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}
.dbi-chat-header{background:linear-gradient(135deg,#0ea5e9,#6366f1);color:#fff;padding:.9rem 1.1rem;display:flex;align-items:center;gap:.6rem;flex-shrink:0}
.dbi-chat-header-avatar{width:2.2rem;height:2.2rem;border-radius:50%;overflow:hidden;flex-shrink:0}
.dbi-chat-header-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.dbi-chat-header-text{flex:1;min-width:0}
.dbi-chat-header-text strong{display:block;font-size:.92rem;font-weight:800}
.dbi-chat-header-text span{display:block;font-size:.72rem;opacity:.85}
.dbi-chat-close{background:none;border:none;color:#fff;opacity:.85;cursor:pointer;padding:.3rem;line-height:0;flex-shrink:0}
.dbi-chat-close:hover{opacity:1}
.dbi-chat-close svg{width:1.1rem;height:1.1rem;fill:currentColor}
.dbi-chat-messages{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.6rem;background:#f8fafc}
.dbi-msg{max-width:82%;padding:.6rem .85rem;border-radius:1rem;font-size:.87rem;line-height:1.45;white-space:pre-wrap;word-wrap:break-word}
.dbi-msg.bot{align-self:flex-start;background:#fff;border:1px solid #e2e8f0;color:#0f172a;border-bottom-left-radius:.3rem}
.dbi-msg.user{align-self:flex-end;background:linear-gradient(135deg,#0ea5e9,#6366f1);color:#fff;border-bottom-right-radius:.3rem}
.dbi-msg strong{font-weight:800}
.dbi-typing{align-self:flex-start;display:flex;gap:.25rem;padding:.7rem .9rem;background:#fff;border:1px solid #e2e8f0;border-radius:1rem;border-bottom-left-radius:.3rem}
.dbi-typing span{width:.4rem;height:.4rem;border-radius:50%;background:#94a3b8;animation:dbiTypingBounce 1.2s infinite ease-in-out}
.dbi-typing span:nth-child(2){animation-delay:.15s}
.dbi-typing span:nth-child(3){animation-delay:.3s}
@keyframes dbiTypingBounce{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-.25rem);opacity:1}}
.dbi-chat-inputrow{display:flex;gap:.5rem;padding:.7rem;border-top:1px solid #e2e8f0;background:#fff;flex-shrink:0}
.dbi-chat-inputrow input{flex:1;border:1px solid #e2e8f0;border-radius:99rem;padding:.6rem 1rem;font-size:.87rem;font-family:inherit;outline:none;min-width:0}
.dbi-chat-inputrow input:focus{border-color:#6366f1}
.dbi-chat-send{flex-shrink:0;width:2.4rem;height:2.4rem;border-radius:50%;border:none;background:linear-gradient(135deg,#0ea5e9,#6366f1);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center}
.dbi-chat-send:disabled{opacity:.5;cursor:default}
.dbi-chat-send svg{width:1.1rem;height:1.1rem;fill:currentColor}
@media(max-width:30em){
  .dbi-chat-panel{right:.6rem;left:.6rem;width:auto;bottom:5.4rem;height:min(75vh,560px)}
  .dbi-chat-btn{right:1rem}
}
