﻿.zx-ai-chat-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  color: #172033;
}

.zx-ai-chat-button {
  width: 72px;
  height: 58px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #0877d9, #00a6c8);
  box-shadow: 0 18px 42px rgba(8, 119, 217, 0.32);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.zx-ai-chat-panel {
  position: absolute;
  right: 0;
  bottom: 58px;
  width: min(390px, calc(100vw - 28px));
  height: min(540px, calc(100vh - 84px));
  display: none;
  overflow: hidden;
  border: 1px solid rgba(220, 230, 239, 0.9);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(8, 18, 31, 0.22);
}

.zx-ai-chat-root.is-open .zx-ai-chat-panel {
  display: flex;
  flex-direction: column;
}

.zx-ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  color: #fff;
  background: linear-gradient(135deg, #08121f, #123345);
}

.zx-ai-chat-header strong,
.zx-ai-chat-header span {
  display: block;
}

.zx-ai-chat-header span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.zx-ai-chat-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: #fff;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
}

.zx-ai-chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  background: #f4f8fb;
}

.zx-ai-chat-msg {
  max-width: 86%;
  margin-bottom: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  line-height: 1.55;
  font-size: 14px;
  white-space: pre-wrap;
}

.zx-ai-chat-msg.assistant {
  color: #172033;
  background: #fff;
  border: 1px solid #dce6ef;
}

.zx-ai-chat-msg.user {
  margin-left: auto;
  color: #fff;
  background: #0877d9;
}

.zx-ai-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 0;
  background: #fff;
  max-height: 76px;
  overflow-y: auto;
}

.zx-ai-chat-quick button {
  min-height: 32px;
  padding: 0 10px;
  color: #0877d9;
  border: 1px solid rgba(8, 119, 217, 0.22);
  border-radius: 8px;
  background: #f0f7ff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.zx-ai-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 12px 10px;
  background: #fff;
  border-top: 1px solid #dce6ef;
}

.zx-ai-chat-input {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #dce6ef;
  border-radius: 8px;
  outline: none;
  font: inherit;
}

.zx-ai-chat-input:focus {
  border-color: #0877d9;
  box-shadow: 0 0 0 3px rgba(8, 119, 217, 0.12);
}

.zx-ai-chat-send {
  min-width: 68px;
  min-height: 42px;
  color: #fff;
  border: 0;
  border-radius: 8px;
  background: #0877d9;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.zx-ai-chat-send:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

@media (max-width: 560px) {
  .zx-ai-chat-root {
    right: 14px;
    bottom: 14px;
  }

  .zx-ai-chat-panel {
    right: -4px;
    bottom: 56px;
    height: min(520px, calc(100vh - 76px));
  }
}

