/* ===== CHATBOT WIDGET ===== */
#chatbot-toggle {
  position: fixed;
  bottom: 25px;
  right: 100px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 114, 255, 0.5);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
#chatbot-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(0, 114, 255, 0.7);
}
#chatbot-toggle i {
  color: #fff;
  font-size: 22px;
}
#chatbot-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: #ff4757;
  border-radius: 50%;
  border: 2px solid #fff;
  display: none;
}

#chatbot-window {
  position: fixed;
  bottom: 90px;
  right: 25px;
  width: 340px;
  max-height: 500px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  z-index: 99998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Jost', sans-serif;
}
#chatbot-window.open {
  display: flex;
  animation: chatSlideUp 0.25s ease;
}
@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Header */
#chatbot-header {
  background: linear-gradient(135deg, #0072ff, #00c6ff);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
#chatbot-header .bot-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#chatbot-header .bot-avatar i { color: #fff; font-size: 18px; }
#chatbot-header .bot-info { flex: 1; }
#chatbot-header .bot-name { color: #fff; font-weight: 600; font-size: 14px; line-height: 1.2; }
#chatbot-header .bot-status { color: rgba(255,255,255,0.85); font-size: 11px; }
#chatbot-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}
#chatbot-close:hover { color: #fff; }

/* Messages */
#chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f7f8fa;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}
#chatbot-messages::-webkit-scrollbar { width: 4px; }
#chatbot-messages::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.chat-msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}
.chat-msg.bot {
  background: #ffffff;
  color: #333333;
  border: 1px solid #e8e8e8;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.chat-msg.user {
  background: linear-gradient(135deg, #0072ff, #00c6ff);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.chat-msg a { color: #0072ff; text-decoration: underline; }

/* Quick replies */
#chatbot-quick {
  padding: 6px 12px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #ffffff;
}
.quick-btn {
  background: #f0f7ff;
  border: 1px solid #0072ff;
  color: #0072ff;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Jost', sans-serif;
}
.quick-btn:hover { background: #d6eaff; }

/* Input */
#chatbot-input-area {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e8e8e8;
  background: #ffffff;
}
#chatbot-input {
  flex: 1;
  background: #f7f8fa;
  border: 1px solid #dde0e6;
  border-radius: 20px;
  padding: 8px 14px;
  color: #333333;
  font-size: 13px;
  outline: none;
  font-family: 'Jost', sans-serif;
  transition: border-color 0.2s;
}
#chatbot-input:focus { border-color: #0072ff; }
#chatbot-input::placeholder { color: #aaa; }
#chatbot-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0072ff, #00c6ff);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
#chatbot-send:hover { opacity: 0.85; }
#chatbot-send i { color: #fff; font-size: 14px; }

/* Typing indicator */
.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 0;
}
.typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0072ff;
  animation: typingBounce 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.3; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* Mobile */
@media (max-width: 480px) {
  #chatbot-window { width: calc(100vw - 24px); right: 12px; bottom: 90px; }
  #chatbot-toggle { right: 90px; bottom: 15px; }
}
