/* AI客服浮窗 */
#chatBubble {
  position: fixed; bottom: 100px; right: 16px; z-index: 500;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 24px;
  border: none; cursor: pointer; box-shadow: 0 4px 20px rgba(196,30,58,0.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s; animation: pulse2 2s infinite;
}
#chatBubble:hover { transform: scale(1.1); }
@keyframes pulse2 { 0%,100% {box-shadow:0 4px 20px rgba(196,30,58,0.35)} 50% {box-shadow:0 4px 30px rgba(196,30,58,0.55)} }

#chatWindow {
  position: fixed; bottom: 100px; right: 16px; z-index: 499;
  width: 340px; max-width: calc(100vw - 32px); height: 450px;
  max-height: calc(100vh - 200px);
  background: #fff; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  display: none; flex-direction: column; overflow: hidden;
}
#chatWindow.open { display: flex; }

.chat-header {
  background: var(--primary); color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.chat-header h3 { font-size: 15px; font-family: var(--font-serif); }
.chat-close { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; padding: 0 4px; }

.chat-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }

.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; word-break: break-word; }
.chat-msg.bot { background: #f0ebe2; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-msg.typing { background: #f0ebe2; align-self: flex-start; color: #999; font-style: italic; }

.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.chat-quick button {
  padding: 6px 12px; border-radius: 16px; font-size: 12px; border: 1px solid rgba(0,0,0,0.1);
  background: #fff; color: var(--text-light); cursor: pointer; transition: 0.15s; white-space: nowrap;
}
.chat-quick button:hover { border-color: var(--primary); color: var(--primary); }

.chat-input-wrap { display: flex; padding: 8px 12px 12px; gap: 8px; border-top: 1px solid rgba(0,0,0,0.06); }
.chat-input-wrap input { flex: 1; padding: 10px 14px; border: 1.5px solid rgba(0,0,0,0.1); border-radius: 20px; font-size: 13px; outline: none; }
.chat-input-wrap input:focus { border-color: var(--primary); }
.chat-input-wrap button {
  padding: 10px 16px; border-radius: 20px; background: var(--primary); color: #fff;
  border: none; font-size: 13px; cursor: pointer; font-weight: 700;
}
.unread-dot {
  position: absolute; top: 2px; right: 2px; width: 12px; height: 12px;
  border-radius: 50%; background: #e74c3c; border: 2px solid #fff;
}
