/* 紫擎官网悬浮对话框 · V0.1 */
.zq-chat-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a3a52 0%, #274a63 100%);
  color: #c8a86a;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(20, 40, 60, 0.25);
  z-index: 9999;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.zq-chat-fab:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 32px rgba(20, 40, 60, 0.35);
}
.zq-chat-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #d64545;
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.zq-chat-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 360px;
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(20, 40, 60, 0.25);
  border: 1px solid #e5e9ee;
  z-index: 9998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Inter', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
.zq-chat-panel.open {
  display: flex;
  animation: zqSlideUp 0.25s ease-out;
}
@keyframes zqSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.zq-chat-header {
  background: linear-gradient(135deg, #1a3a52 0%, #274a63 100%);
  color: white;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.zq-chat-header-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.zq-chat-header-title .zq-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
}
.zq-chat-close {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: none;
  cursor: pointer;
  font-size: 20px;
  padding: 4px;
  line-height: 1;
}
.zq-chat-close:hover { color: white; }

.zq-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f7f9fb;
}
.zq-msg {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
}
.zq-msg-bot { justify-content: flex-start; }
.zq-msg-user { justify-content: flex-end; }
.zq-msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.zq-msg-bot .zq-msg-bubble {
  background: white;
  color: #23303a;
  border: 1px solid #e5e9ee;
  border-top-left-radius: 4px;
}
.zq-msg-user .zq-msg-bubble {
  background: #1a3a52;
  color: white;
  border-top-right-radius: 4px;
}
.zq-msg-typing .zq-msg-bubble {
  color: #6a7580;
  font-style: italic;
}

.zq-chat-quick {
  padding: 0 16px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #f7f9fb;
}
.zq-chat-quick button {
  background: white;
  border: 1px solid #d0d7de;
  color: #1a3a52;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.zq-chat-quick button:hover {
  background: #1a3a52;
  color: white;
  border-color: #1a3a52;
}

.zq-chat-input {
  border-top: 1px solid #e5e9ee;
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  background: white;
}
.zq-chat-input textarea {
  flex: 1;
  border: 1px solid #e5e9ee;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  height: 40px;
  max-height: 100px;
  outline: none;
}
.zq-chat-input textarea:focus { border-color: #c8a86a; }
.zq-chat-input button {
  background: #c8a86a;
  color: #0f2637;
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}
.zq-chat-input button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.zq-chat-footer-hint {
  padding: 6px 16px 10px;
  font-size: 11px;
  color: #6a7580;
  background: white;
  text-align: center;
  border-top: 1px solid #f0f2f5;
}

@media (max-width: 600px) {
  .zq-chat-panel {
    right: 8px;
    left: 8px;
    width: auto;
    bottom: 84px;
    height: 70vh;
  }
  .zq-chat-fab { right: 16px; bottom: 16px; }
}
