/* ---------- 在线咨询组件（规则式 FAQ + 预留 AI 接口） ---------- */
.dr-chat-launcher{
  position:fixed;right:22px;bottom:136px;z-index:1200;
  display:flex;align-items:center;gap:9px;
  border:0;cursor:pointer;color:#fff;
  padding:12px 17px 12px 14px;border-radius:999px;
  font-size:13px;font-weight:700;letter-spacing:.3px;
  font-family:inherit;
  background:linear-gradient(120deg,#173ba8,#2563eb 55%,#22d3ee);
  box-shadow:0 8px 26px rgba(23,59,168,.38),inset 0 1px 0 rgba(255,255,255,.28);
  transition:transform .22s ease,box-shadow .22s ease;
}
.dr-chat-launcher:hover{transform:translateY(-2px);box-shadow:0 12px 32px rgba(23,59,168,.5),inset 0 1px 0 rgba(255,255,255,.32)}
.dr-chat-launcher svg{width:19px;height:19px;flex:none}
.dr-chat-launcher .dr-dot{
  position:absolute;top:-2px;right:-2px;width:10px;height:10px;border-radius:50%;
  background:#22d3ee;border:2px solid #fff;
}

.dr-chat-panel{
  position:fixed;right:22px;bottom:136px;z-index:1201;
  width:348px;height:474px;max-height:calc(100vh - 44px);
  display:flex;flex-direction:column;overflow:hidden;
  background:#fff;border:1px solid #dbe4f0;border-radius:16px;
  box-shadow:0 20px 60px rgba(10,23,52,.24);
  font-family:"PingFang SC","Microsoft YaHei","Hiragino Sans GB",sans-serif;
  opacity:0;visibility:hidden;transform:translateY(14px) scale(.98);
  transform-origin:bottom right;
  transition:opacity .22s ease,transform .22s ease,visibility .22s;
}
.dr-chat-panel.open{opacity:1;visibility:visible;transform:translateY(0) scale(1)}

.dr-chat-head{
  flex:none;display:flex;align-items:center;gap:11px;
  padding:15px 16px;color:#fff;
  background:linear-gradient(120deg,#0a1734,#173ba8 60%,#2563eb);
}
.dr-chat-avatar{width:36px;height:36px;border-radius:10px;background:rgba(255,255,255,.14);
  display:flex;align-items:center;justify-content:center;flex:none}
.dr-chat-avatar svg{width:21px;height:21px}
.dr-chat-head strong{display:block;font-size:14px;line-height:1.3}
.dr-chat-head small{display:block;font-size:11px;color:#a9c6f5;margin-top:2px}
.dr-chat-close{margin-left:auto;background:rgba(255,255,255,.12);border:0;color:#fff;
  width:28px;height:28px;border-radius:8px;cursor:pointer;font-size:18px;line-height:1;
  display:flex;align-items:center;justify-content:center;font-family:inherit}
.dr-chat-close:hover{background:rgba(255,255,255,.22)}

.dr-chat-body{flex:1;overflow-y:auto;padding:16px;background:#f6f9ff;scroll-behavior:smooth}
.dr-msg{display:flex;gap:8px;margin-bottom:14px;align-items:flex-start}
.dr-msg.me{flex-direction:row-reverse}
.dr-msg .bubble{max-width:82%;padding:10px 13px;border-radius:12px;font-size:13px;line-height:1.7;
  background:#fff;color:#1e293b;border:1px solid #e2e8f0;white-space:pre-wrap;word-break:break-word}
.dr-msg.me .bubble{background:linear-gradient(120deg,#173ba8,#2563eb);color:#fff;border-color:transparent}
.dr-msg .who{flex:none;width:26px;height:26px;border-radius:8px;background:#e8effc;color:#173ba8;
  font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}
.dr-msg.me .who{background:#dbeafe}
.dr-typing{display:inline-flex;gap:4px;align-items:center;height:18px}
.dr-typing i{width:5px;height:5px;border-radius:50%;background:#94a3b8;animation:dr-blink 1.1s infinite ease-in-out}
.dr-typing i:nth-child(2){animation-delay:.16s}.dr-typing i:nth-child(3){animation-delay:.32s}
@keyframes dr-blink{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}

.dr-chat-quick{flex:none;display:flex;gap:6px;flex-wrap:wrap;padding:0 14px 10px;background:#f6f9ff}
.dr-chat-quick button{background:#fff;border:1px solid #cbd9f0;border-radius:999px;color:#173ba8;
  font-size:11.5px;padding:5px 10px;cursor:pointer;font-family:inherit;transition:border-color .15s,background .15s}
.dr-chat-quick button:hover{border-color:#2563eb;background:#eef4ff}

.dr-chat-input{flex:none;display:flex;gap:8px;padding:12px 14px;border-top:1px solid #e2e8f0;background:#fff}
.dr-chat-input input{flex:1;min-width:0;border:1px solid #dbe4f0;border-radius:10px;padding:9px 11px;
  font-size:13px;outline:none;font-family:inherit;color:#1e293b}
.dr-chat-input input:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.dr-chat-input button{background:linear-gradient(120deg,#173ba8,#2563eb);color:#fff;border:0;
  border-radius:10px;padding:0 15px;font-size:13px;font-weight:700;cursor:pointer;font-family:inherit;flex:none}
.dr-chat-input button:hover{filter:brightness(1.08)}
.dr-chat-foot{flex:none;text-align:center;font-size:10.5px;color:#94a3b8;padding:0 0 9px;background:#fff}
.dr-chat-foot a{color:#2563eb;text-decoration:none}

@media(max-width:520px){
  .dr-chat-launcher{right:16px;bottom:126px;padding:11px 15px 11px 12px;font-size:12px}
  .dr-chat-panel{right:10px;left:10px;bottom:126px;width:auto;height:70vh}
}
@media(prefers-reduced-motion:reduce){
  .dr-chat-panel,.dr-chat-launcher{transition:none}.dr-typing i{animation:none}
}
