/* ============================================================
   在线咨询窗口
   配置集中在 chat.js 顶部的 XQ_CHAT 对象里
   ============================================================ */

.xq-chat-btn{
  position:fixed;right:24px;bottom:24px;z-index:200;
  width:56px;height:56px;border-radius:50%;
  background:var(--accent);color:#fff;border:none;cursor:pointer;
  display:grid;place-items:center;
  box-shadow:0 8px 24px rgba(192,86,33,.34);
  transition:transform .2s, background .2s;
}
.xq-chat-btn:hover{transform:translateY(-2px);background:var(--accent-dk)}
.xq-chat-btn svg{width:25px;height:25px}
.xq-chat-btn .xq-dot{
  position:absolute;top:2px;right:2px;width:11px;height:11px;border-radius:50%;
  background:#3ecf8e;border:2px solid #fff;
}

.xq-chat{
  position:fixed;right:24px;bottom:92px;z-index:210;
  width:366px;max-height:min(620px,calc(100vh - 130px));
  background:#fff;border-radius:16px;overflow:hidden;
  box-shadow:0 24px 60px rgba(22,33,43,.22);
  display:flex;flex-direction:column;
  opacity:0;transform:translateY(12px) scale(.98);pointer-events:none;
  transition:opacity .22s ease, transform .22s ease;
}
.xq-chat.open{opacity:1;transform:none;pointer-events:auto}

.xq-head{
  background:var(--ink);color:#fff;padding:16px 18px;
  display:flex;align-items:center;gap:12px;flex:0 0 auto;
}
.xq-avatar{
  width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.12);
  display:grid;place-items:center;overflow:hidden;flex:0 0 auto;
}
.xq-avatar img{width:100%;height:100%;object-fit:cover}
.xq-avatar span{font-size:16px;font-weight:600}
.xq-head-txt{flex:1;min-width:0}
.xq-head-txt strong{display:block;font-size:14.5px;font-weight:600;line-height:1.3}
.xq-head-txt em{
  font-style:normal;font-size:11.5px;color:rgba(255,255,255,.62);
  display:flex;align-items:center;gap:5px;margin-top:3px;
}
.xq-head-txt em::before{
  content:"";width:6px;height:6px;border-radius:50%;background:#3ecf8e;
}
.xq-close{
  background:none;border:none;color:rgba(255,255,255,.6);cursor:pointer;
  font-size:22px;line-height:1;padding:0 2px;
}
.xq-close:hover{color:#fff}

.xq-tabs{
  display:flex;gap:6px;padding:9px 14px;flex:0 0 auto;
  background:var(--paper);border-bottom:1px solid var(--line);
}
.xq-tabs button{
  flex:1;border:1px solid transparent;background:transparent;
  font:inherit;font-size:12.5px;color:var(--ink-3);
  padding:7px 10px;border-radius:8px;cursor:pointer;transition:all .18s;
}
.xq-tabs button:hover{color:var(--ink-2)}
.xq-tabs button.on{
  background:#fff;color:var(--ink);border-color:var(--line);
  box-shadow:0 1px 3px rgba(22,33,43,.07);
}
.xq-tabs button.wa.on{color:#10874a}

.xq-body{padding:18px;overflow-y:auto;background:var(--paper);flex:1}
.xq-msg{
  background:#fff;border-radius:12px 12px 12px 4px;padding:13px 15px;
  font-size:14px;color:var(--ink-2);line-height:1.65;
  box-shadow:0 1px 2px rgba(22,33,43,.05);margin-bottom:14px;
}
.xq-quick{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}

/* 常见问题折叠块 */
.xq-faqwrap{
  background:#fff;border:1px solid var(--line);border-radius:10px;
  margin-bottom:14px;overflow:hidden;
}
.xq-faqwrap>summary{
  cursor:pointer;padding:10px 13px;font-size:12.5px;color:var(--ink-2);
  list-style:none;display:flex;align-items:center;justify-content:space-between;
  border-radius:10px;transition:color .18s;
}
.xq-faqwrap>summary:hover{color:var(--accent)}
.xq-faqwrap>summary::-webkit-details-marker{display:none}
.xq-faqwrap>summary::after{content:"＋";color:var(--ink-3);font-size:13px;line-height:1}
.xq-faqwrap[open]>summary::after{content:"－"}
.xq-faqwrap[open]>summary{border-bottom:1px solid var(--line);border-radius:10px 10px 0 0}
.xq-faq details{border-bottom:1px solid var(--line)}
.xq-faq details:last-child{border-bottom:0}
.xq-faq summary{
  cursor:pointer;padding:9px 13px;font-size:12.5px;color:var(--ink-2);
  list-style:none;transition:color .18s;
}
.xq-faq summary:hover{color:var(--accent)}
.xq-faq summary::-webkit-details-marker{display:none}
.xq-faq summary::before{content:"· ";color:var(--ink-3)}
.xq-faq p{
  margin:0;padding:0 13px 11px 20px;
  font-size:12.5px;line-height:1.66;color:var(--ink-3);
}
.xq-quick button{
  border:1px solid var(--line);background:#fff;color:var(--ink-2);
  font:inherit;font-size:12.5px;padding:7px 12px;border-radius:999px;
  cursor:pointer;transition:all .18s;
}
.xq-quick button:hover{border-color:var(--accent);color:var(--accent)}

.xq-field{margin-bottom:10px}
.xq-field input,.xq-field textarea{
  width:100%;border:1px solid var(--line);border-radius:9px;
  background:#fff;font:inherit;font-size:14px;color:var(--ink);
  padding:11px 13px;outline:none;transition:border-color .2s;resize:vertical;
}
.xq-field input:focus,.xq-field textarea:focus{border-color:var(--accent)}
.xq-field input::placeholder,.xq-field textarea::placeholder{color:#a8a29a}

.xq-send{
  width:100%;height:44px;border:none;border-radius:9px;
  background:var(--accent);color:#fff;font:inherit;font-size:14.5px;
  font-weight:500;cursor:pointer;transition:background .2s;margin-top:2px;
}
.xq-send:hover{background:var(--accent-dk)}
.xq-send:disabled{opacity:.6;cursor:default}

/* WhatsApp 主按钮 */
.xq-send.wa{
  display:flex;align-items:center;justify-content:center;gap:9px;
  background:#25d366;
}
.xq-send.wa:hover{background:#1fb457}
.xq-send.wa svg{width:19px;height:19px;flex:0 0 auto}

/* 微信客服直达按钮 */
.xq-send.wxkf{
  display:flex;align-items:center;justify-content:center;gap:9px;
  background:#07c160;margin-top:14px;
}
.xq-send.wxkf:hover{background:#06ad56}
.xq-send.wxkf svg{width:18px;height:18px;flex:0 0 auto}

.xq-note a{color:var(--accent);text-decoration:underline}
.xq-alt{font-size:11.5px;line-height:1.5;margin-top:5px}
.xq-alt a{color:var(--accent);text-decoration:underline}
.xq-mail{display:inline-block;margin-left:8px;color:#1f6b45;text-decoration:underline}

.xq-note{
  font-size:11.5px;color:var(--ink-3);margin-top:10px;line-height:1.55;
}
.xq-ok{
  background:#eaf6ef;border:1px solid #c6e3d2;color:#1f6b45;
  border-radius:10px;padding:12px 14px;font-size:13.5px;line-height:1.6;
}

.xq-divider{
  display:flex;align-items:center;gap:12px;
  margin:20px 0 14px;color:var(--ink-3);font-size:11.5px;letter-spacing:.08em;
}
.xq-divider::before,.xq-divider::after{
  content:"";flex:1;height:1px;background:var(--line);
}

.xq-wx{display:flex;gap:14px;align-items:center}
.xq-wx-code{
  width:96px;height:96px;border-radius:8px;background:#eeebe4;
  flex:0 0 auto;overflow:hidden;position:relative;
  display:grid;place-items:center;
}
.xq-wx-code img{width:100%;height:100%;object-fit:cover}
.xq-wx-code span{font-size:10.5px;color:#9a9288;text-align:center;padding:0 6px;line-height:1.4}
.xq-wx-info{flex:1;min-width:0}
.xq-wa-code{background:#e9f9f0;display:grid;place-items:center}
.xq-wa-code svg{width:46px;height:46px}
.xq-wx-info strong{display:block;font-size:13.5px;margin-bottom:6px}
.xq-wx-info code{
  display:inline-block;font-size:13px;color:var(--accent);
  background:var(--accent-soft);padding:3px 8px;border-radius:5px;
  margin-bottom:8px;word-break:break-all;
}
.xq-copy{
  display:block;border:1px solid var(--line);background:#fff;
  font:inherit;font-size:12px;color:var(--ink-2);cursor:pointer;
  padding:5px 11px;border-radius:999px;transition:all .18s;
}
.xq-copy:hover{border-color:var(--accent);color:var(--accent)}

@media (max-width:720px){
  .xq-chat{
    right:12px;left:12px;bottom:84px;width:auto;
    max-height:calc(100vh - 120px);
  }
  .xq-chat-btn{right:18px;bottom:18px;width:52px;height:52px}
}
