/* AI Chatbot Widget Styles - Enhanced UI */

/* Toggle Button */
.chatbot-toggle{position:fixed;bottom:24px;right:24px;width:60px;height:60px;border-radius:50%;background:var(--gradient-primary);border:none;cursor:pointer;z-index:9999;display:flex;align-items:center;justify-content:center;font-size:1.4rem;color:#fff;box-shadow:0 4px 20px rgba(124,58,237,.4);transition:all .3s ease;animation:chatbot-pulse 2s infinite}
.chatbot-toggle:hover{transform:scale(1.1);box-shadow:0 6px 30px rgba(124,58,237,.6)}
.chatbot-toggle.active{animation:none;background:var(--accent-rose);border-radius:16px;width:48px;height:48px;font-size:1.1rem}
.chat-badge{position:absolute;top:-4px;right:-4px;width:18px;height:18px;border-radius:50%;background:var(--accent-rose);font-size:.65rem;display:flex;align-items:center;justify-content:center;font-weight:700;border:2px solid var(--bg-primary)}
@keyframes chatbot-pulse{0%,100%{box-shadow:0 4px 20px rgba(124,58,237,.4)}50%{box-shadow:0 4px 30px rgba(124,58,237,.7),0 0 60px rgba(124,58,237,.2)}}

/* Window */
.chatbot-window{position:fixed;bottom:96px;right:24px;width:400px;max-height:560px;background:rgba(17,24,39,0.95);backdrop-filter:blur(20px);border:1px solid var(--border-glass);border-radius:20px;box-shadow:0 16px 48px rgba(0,0,0,.5),0 0 0 1px rgba(124,58,237,.1);z-index:9999;display:flex;flex-direction:column;opacity:0;visibility:hidden;transform:translateY(20px) scale(.95);transition:all .35s cubic-bezier(.4,0,.2,1);overflow:hidden}
.chatbot-window.open{opacity:1;visibility:visible;transform:translateY(0) scale(1)}

/* Header */
.chatbot-header{padding:16px 20px;background:linear-gradient(135deg,rgba(124,58,237,.2),rgba(6,182,212,.1));border-bottom:1px solid var(--border-glass);display:flex;align-items:center;gap:12px;cursor:move;user-select:none}
.chatbot-header .bot-avatar{width:40px;height:40px;border-radius:14px;background:var(--gradient-primary);display:flex;align-items:center;justify-content:center;font-size:1.1rem;color:#fff;flex-shrink:0}
.chatbot-header .bot-info{flex:1}
.chatbot-header .bot-info h4{font-size:.95rem;color:var(--text-primary);margin-bottom:2px;font-weight:600}
.chatbot-header .bot-info span{font-size:.75rem;color:var(--accent-emerald);display:flex;align-items:center;gap:4px}
.chatbot-header .bot-info span::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--accent-emerald);animation:blink 2s infinite}
.chat-header-actions{display:flex;gap:4px}
.chat-action-btn{width:32px;height:32px;border-radius:8px;border:none;background:rgba(255,255,255,.05);color:var(--text-muted);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:.8rem;transition:all .2s}
.chat-action-btn:hover{background:rgba(255,255,255,.12);color:var(--text-primary)}

/* Messages */
.chatbot-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:14px;min-height:300px;max-height:360px;scroll-behavior:smooth}
.chatbot-messages::-webkit-scrollbar{width:4px}
.chatbot-messages::-webkit-scrollbar-thumb{background:rgba(124,58,237,.3);border-radius:2px}

.chat-msg{display:flex;gap:8px;max-width:88%;animation:msg-in .35s cubic-bezier(.4,0,.2,1)}
@keyframes msg-in{from{opacity:0;transform:translateY(12px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}
.chat-msg.bot{align-self:flex-start}
.chat-msg.user{align-self:flex-end;flex-direction:row-reverse}
.chat-msg .msg-avatar{width:28px;height:28px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:.75rem;flex-shrink:0;margin-top:4px}
.chat-msg.bot .msg-avatar{background:rgba(124,58,237,.15)}
.chat-msg.user .msg-avatar{background:rgba(6,182,212,.15)}
.chat-msg .msg-content{display:flex;flex-direction:column;gap:2px}
.chat-msg .msg-bubble{padding:10px 14px;border-radius:16px;font-size:.88rem;line-height:1.6;color:var(--text-primary);word-break:break-word}
.chat-msg.bot .msg-bubble{background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);border-top-left-radius:4px}
.chat-msg.user .msg-bubble{background:linear-gradient(135deg,rgba(124,58,237,.25),rgba(124,58,237,.15));border:1px solid rgba(124,58,237,.2);border-top-right-radius:4px}
.chat-msg .msg-time{font-size:.68rem;color:var(--text-muted);padding:0 4px;opacity:.6}
.chat-msg.user .msg-time{text-align:right}

/* Typing */
.chat-typing{display:flex;gap:8px;align-self:flex-start;align-items:center;animation:msg-in .3s ease}
.typing-dots{display:flex;gap:3px;padding:10px 14px;background:rgba(255,255,255,.05);border-radius:16px;border-top-left-radius:4px}
.typing-dots span{width:6px;height:6px;border-radius:50%;background:var(--text-muted);animation:typing .8s infinite}
.typing-dots span:nth-child(2){animation-delay:.15s}
.typing-dots span:nth-child(3){animation-delay:.3s}
@keyframes typing{0%,100%{opacity:.3;transform:translateY(0)}50%{opacity:1;transform:translateY(-4px)}}

/* Quick Replies */
.quick-replies{display:flex;flex-wrap:wrap;gap:6px;padding:4px 0;animation:msg-in .4s ease}
.quick-reply-btn{padding:6px 14px;border-radius:20px;border:1px solid rgba(124,58,237,.25);background:rgba(124,58,237,.08);color:#a78bfa;font-size:.78rem;cursor:pointer;transition:all .2s;white-space:nowrap}
.quick-reply-btn:hover{background:rgba(124,58,237,.2);border-color:rgba(124,58,237,.4);transform:translateY(-1px)}

/* Suggestions */
.chat-suggestions{border-top:1px solid var(--border-glass);padding:6px 12px;background:rgba(17,24,39,.98);max-height:120px;overflow-y:auto}
.suggestion-list{display:flex;flex-wrap:wrap;gap:4px}
.suggestion-item{padding:4px 12px;border-radius:14px;border:1px solid rgba(124,58,237,.2);background:rgba(124,58,237,.06);color:var(--text-secondary);font-size:.78rem;cursor:pointer;transition:all .2s;white-space:nowrap}
.suggestion-item:hover{background:rgba(124,58,237,.18);color:var(--accent-purple);border-color:rgba(124,58,237,.35)}

/* Input */
.chatbot-input{padding:12px 16px;border-top:1px solid var(--border-glass);display:flex;gap:8px;background:rgba(10,14,26,.6)}
.chatbot-input input{flex:1;padding:10px 16px;border-radius:24px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);color:var(--text-primary);font-size:.9rem;outline:none;transition:all .2s;font-family:var(--font-body)}
.chatbot-input input:focus{border-color:var(--accent-purple);background:rgba(255,255,255,.08);box-shadow:0 0 0 3px rgba(124,58,237,.08)}
.chatbot-input input::placeholder{color:var(--text-muted)}
.chatbot-input button{width:40px;height:40px;border-radius:50%;background:var(--gradient-primary);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#fff;font-size:.9rem;transition:all .2s;flex-shrink:0}
.chatbot-input button:hover{transform:scale(1.05);box-shadow:0 2px 12px rgba(124,58,237,.3)}
.chatbot-input button:disabled{opacity:.4;cursor:not-allowed;transform:none}
.chatbot-input button:active:not(:disabled){transform:scale(.95)}

/* Responsive */
@media(max-width:480px){
  .chatbot-window{width:calc(100vw - 24px);right:12px;bottom:88px;max-height:75vh;border-radius:16px}
  .chatbot-toggle{bottom:16px;right:16px;width:52px;height:52px}
  .chatbot-toggle.active{width:44px;height:44px}
}
