
#bl-ai-toggle {
  position:fixed;right:20px;bottom:20px;z-index:2147483000;
  border:0;border-radius:999px;padding:14px 19px;
  background:linear-gradient(135deg,#1d4ed8,#2563eb);
  color:white;font:700 14px system-ui,sans-serif;
  box-shadow:0 10px 32px #1d4ed850;cursor:pointer;
}
#bl-ai-panel {
  position:fixed;right:20px;bottom:82px;
  width:min(390px,calc(100vw - 24px));
  height:min(570px,calc(100dvh - 110px));
  z-index:2147483001;background:white;color:#172033;
  border:1px solid #dbe4f0;border-radius:20px;
  box-shadow:0 22px 70px #0f172a35;
  display:flex;flex-direction:column;overflow:hidden;
  font:14px system-ui,sans-serif;
}
#bl-ai-panel[hidden] {display:none!important}
#bl-ai-head {
  background:linear-gradient(135deg,#1e40af,#3b82f6);
  color:white;padding:17px;display:flex;
  align-items:center;justify-content:space-between;
}
#bl-ai-head strong {font-size:16px}
#bl-ai-head small {display:block;opacity:.85;margin-top:3px}
#bl-ai-close {
  border:0;background:#ffffff25;color:white;
  width:34px;height:34px;border-radius:10px;
  cursor:pointer;font-size:22px;
}
#bl-ai-messages {
  flex:1;min-height:0;overflow-y:auto;padding:15px;
  background:#f8faff;display:flex;flex-direction:column;gap:12px;
}
.bl-ai-msg {
  max-width:90%;padding:11px 13px;border-radius:14px;
  line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;
}
.bl-ai-bot {align-self:flex-start;background:white;border:1px solid #e2e8f0}
.bl-ai-user {align-self:flex-end;background:#dbeafe;color:#1e3a8a}
#bl-ai-form {
  display:flex;gap:8px;padding:12px;
  border-top:1px solid #e2e8f0;background:white;
}
#bl-ai-input {
  flex:1;min-width:0;border:1px solid #cbd5e1;
  border-radius:12px;padding:11px;font-size:16px;
  background:white;color:#172033;
}
#bl-ai-send {
  border:0;border-radius:12px;background:#2563eb;
  color:white;padding:0 15px;cursor:pointer;font-weight:700;
}
#bl-ai-send:disabled {opacity:.55;cursor:wait}
@media(max-width:600px) {
  #bl-ai-toggle {right:12px;bottom:12px}
  #bl-ai-panel {
    right:8px;bottom:72px;width:calc(100vw - 16px);
    height:min(75dvh,620px);border-radius:17px;
  }
}


/* BLAZELEARN_TYPING_V1 */
.bl-ai-typing {
  display:flex;
  align-items:center;
  gap:5px;
  min-height:23px;
  width:max-content;
  padding:13px 17px;
}

.bl-ai-typing span {
  width:8px;
  height:8px;
  display:block;
  border-radius:50%;
  background:#3b82f6;
  animation:bl-ai-dot-bounce 1.1s infinite ease-in-out;
}

.bl-ai-typing span:nth-child(2) {
  animation-delay:.16s;
}

.bl-ai-typing span:nth-child(3) {
  animation-delay:.32s;
}

@keyframes bl-ai-dot-bounce {
  0%,60%,100% {
    transform:translateY(0);
    opacity:.35;
  }
  30% {
    transform:translateY(-7px);
    opacity:1;
  }
}

@media(prefers-reduced-motion:reduce) {
  .bl-ai-typing span {
    animation:none;
    opacity:.7;
  }
}
