/* Floating AI Chat Widget */
.ai-chat-toggle{position:fixed;right:72px;bottom:18px;width:56px;height:56px;border-radius:18px;background:linear-gradient(135deg,#7dba28,#63a61e);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 14px 32px -16px rgba(0,0,0,.4);cursor:pointer;z-index:120001;border:1px solid rgba(255,255,255,.15);backdrop-filter:saturate(120%);} 
.ai-chat-toggle:hover{transform:translateY(-2px);box-shadow:0 18px 40px -18px rgba(0,0,0,.5);} 
.ai-chat-toggle i{font-size:22px;}

/* removed red badge */

.ai-chat{position:fixed;right:72px;bottom:86px;width:360px;max-height:70vh;background:#ffffff;border:1px solid #e5e7eb;border-radius:16px;box-shadow:0 24px 60px -24px rgba(0,0,0,.35);display:none;flex-direction:column;overflow:hidden;z-index:120010;}
.ai-chat.open{display:flex;}
.ai-chat__head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:linear-gradient(90deg,#111827,#0f172a);color:#fff;}
.ai-chat__title{font-weight:800;letter-spacing:.2px;font-size:14px;margin:0;display:flex;align-items:center;gap:8px;}
.ai-chat__controls{display:flex;gap:6px;}
.ai-chat__btn{background:transparent;border:none;color:#cbd5e1;cursor:pointer;font-size:18px;}
.ai-chat__btn:hover{color:#fff;}
/* layout toggle visibility */
.ai-chat__btn.ai-layout{display:inline-flex;}
@media (max-width:768px){.ai-chat__btn.ai-layout{display:none;}}

.ai-chat__body{flex:1;overflow:auto;padding:12px;background:#fafbfc;}
.ai-chat__msg{display:flex;margin-bottom:10px;gap:8px;}
.ai-chat__msg .bubble{max-width:80%;padding:10px 12px;border-radius:14px;font-size:14px;line-height:1.4;box-shadow:0 4px 14px -10px rgba(0,0,0,.25);} 
.ai-chat__msg.user{justify-content:flex-end;}
.ai-chat__msg.user .bubble{background:#e8f5db;border:1px solid #d5edbe;color:#1a2b0b;border-bottom-right-radius:4px;}
.ai-chat__msg.bot .bubble{background:#fff;border:1px solid #e5e7eb;color:#111827;border-bottom-left-radius:4px;}
.ai-chat__foot{display:flex;gap:8px;padding:10px;background:#fff;border-top:1px solid #eef0f3;}
.ai-chat__input{flex:1;border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px;font-size:14px;}
.ai-chat__send{background:#7dba28;color:#fff;border:none;border-radius:12px;padding:10px 14px;font-weight:700;cursor:pointer;}
.ai-chat__send:hover{filter:brightness(1.02);} 

.ai-chat__hint{font-size:12px;color:#64748b;margin:0 0 8px;text-align:center;}
.ai-chat__source{margin-top:6px;font-size:12px;color:#475569;}
.ai-chat__source a{color:#377dff;text-decoration:none;}

@media (max-width:600px){
  .ai-chat{right:10px;left:10px;bottom:82px;width:auto;max-height:72vh;z-index:120010;}
  .ai-chat-toggle{right:70px;bottom:12px;width:54px;height:54px;border-radius:16px;}
}

/* Subtle loading dots */
.ai-typing{display:inline-block;}
.ai-typing span{display:inline-block;width:6px;height:6px;background:#94a3b8;border-radius:50%;margin:0 2px;animation:blink 1s infinite ease-in-out;}
.ai-typing span:nth-child(2){animation-delay:.2s}
.ai-typing span:nth-child(3){animation-delay:.4s}
@keyframes blink{0%,80%,100%{opacity:.2}40%{opacity:1}}

/* Sidebar layout (desktop) */
.ai-chat.sidebar{right:20px;bottom:20px;top:84px;left:auto;width:420px;max-height:none;height:auto;}
.ai-chat.sidebar .ai-chat__body{height:calc(100% - 104px);} 

/* Indexing banner */
.ai-indexing{display:flex;align-items:center;justify-content:center;gap:6px;color:#94a3b8;font-size:12px;margin:6px 0;}
.ai-indexing .dot{width:6px;height:6px;border-radius:50%;background:#94a3b8;animation:blink 1s infinite ease-in-out;}
.ai-indexing .dot:nth-child(2){animation-delay:.2s}
.ai-indexing .dot:nth-child(3){animation-delay:.4s}
