/* ============================================
   AI 答疑机器人 Widget 样式
   ============================================ */
.chatbot-widget {
  position: fixed; right: 20px; bottom: 90px; z-index: 99999;
  transform: none !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.chatbot-toggle {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #1a73e8, #4a90d9);
  color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 6px 20px rgba(26,115,232,0.4);
  position: relative; transition: all 0.3s;
}
.chatbot-toggle:hover { transform: scale(1.1); box-shadow: 0 8px 24px rgba(26,115,232,0.5); }
.chatbot-toggle .chatbot-icon { display: flex; }
.chatbot-toggle .chatbot-tip {
  position: absolute; right: 76px; top: 50%; transform: translateY(-50%);
  background: #1f2937; color: #fff; padding: 6px 12px; border-radius: 6px;
  font-size: 13px; white-space: nowrap; opacity: 0; transition: opacity 0.2s;
}
.chatbot-toggle .chatbot-tip::after {
  content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: #1f2937;
}
.chatbot-toggle:hover .chatbot-tip { opacity: 1; }
.chatbot-toggle::before {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid #1a73e8; opacity: 0.6;
  animation: chatbotPulse 2s infinite;
}
@keyframes chatbotPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}
.chatbot-window {
  position: absolute; right: 0; bottom: 76px; width: 380px; height: 560px;
  background: #fff; border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  display: flex; flex-direction: column; overflow: hidden;
}
.chatbot-header {
  background: linear-gradient(135deg, #1a73e8, #4a90d9); color: #fff;
  padding: 16px; display: flex; justify-content: space-between; align-items: center;
}
.chatbot-title { display: flex; align-items: center; gap: 12px; }
.chatbot-avatar { font-size: 32px; }
.chatbot-title strong { display: block; font-size: 16px; }
.chatbot-status { font-size: 12px; opacity: 0.9; }
.chatbot-status::before { content: '●'; color: #10b981; margin-right: 4px; }
.chatbot-close {
  background: rgba(255,255,255,0.2); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1;
}
.chatbot-messages { flex: 1; padding: 16px; overflow-y: auto; background: #f8fafc; }
.chat-msg { display: flex; gap: 8px; margin-bottom: 16px; align-items: flex-start; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.chat-msg.user { flex-direction: row-reverse; }
.chat-msg.user .chat-bubble { background: #1a73e8; color: #fff; }
.chat-bubble {
  max-width: 75%; padding: 10px 14px; background: #fff; border-radius: 12px;
  font-size: 14px; line-height: 1.6; box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  word-wrap: break-word;
}
.chat-msg.typing .chat-bubble { padding: 12px 16px; }
.dot-typing { display: inline-block; width: 6px; height: 6px; background: #94a3b8; border-radius: 50%; margin: 0 2px; animation: typing 1.2s infinite; }
.dot-typing:nth-child(2) { animation-delay: 0.2s; }
.dot-typing:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-cta { text-align: center; margin: 12px 0; }
.chat-cta-btn {
  display: inline-block; margin: 4px; padding: 8px 16px;
  background: #ff6b35; color: #fff; border: none; border-radius: 999px;
  font-size: 13px; cursor: pointer; text-decoration: none; font-weight: 600;
}
.chatbot-quick { padding: 0 12px 8px; display: flex; gap: 6px; overflow-x: auto; background: #f8fafc; }
.quick-btn {
  flex-shrink: 0; padding: 6px 12px; background: #fff; border: 1px solid #e5e7eb;
  border-radius: 999px; cursor: pointer; font-size: 12px; color: #1a73e8;
}
.quick-btn:hover { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.chatbot-input { padding: 12px; background: #fff; display: flex; gap: 8px; border-top: 1px solid #e5e7eb; }
.chatbot-input input {
  flex: 1; padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 999px;
  font-size: 14px; outline: none;
}
.chatbot-input input:focus { border-color: #1a73e8; }
.chatbot-input button {
  padding: 10px 20px; background: #1a73e8; color: #fff; border: none;
  border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 14px;
}
.chatbot-foot { padding: 8px 16px; text-align: center; font-size: 12px; color: #6b7280; background: #f8fafc; }
.chatbot-foot a { color: #1a73e8; text-decoration: none; }
@media (max-width: 480px) {
  .chatbot-widget { right: 10px; bottom: 80px; }
  .chatbot-window { width: calc(100vw - 20px); height: calc(100vh - 200px); }
}
