/* HONGSHI · on-site consultation widget */
.hs-chat-btn {
  position: fixed; right: 22px; bottom: 22px; z-index: 9998;
  display: flex; align-items: center; gap: 9px;
  background: #e2570f; color: #fff; border: 0; cursor: pointer;
  padding: 13px 18px; border-radius: 999px;
  font: 600 14px/1 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-shadow: 0 10px 26px rgba(12,26,38,.24);
  transition: transform .16s ease, box-shadow .16s ease;
}
.hs-chat-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(12,26,38,.3); }
.hs-chat-btn svg { width: 18px; height: 18px; }
.hs-chat-btn .hs-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #7ee08a;
  box-shadow: 0 0 0 3px rgba(126,224,138,.25);
}
.hs-chat-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 9999;
  width: 372px; max-width: calc(100vw - 32px);
  height: 546px; max-height: calc(100vh - 44px);
  display: none; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: 16px;
  border: 1px solid rgba(12,26,38,.1);
  box-shadow: 0 24px 60px rgba(12,26,38,.26);
  font: 14px/1.55 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1d2b36;
}
.hs-chat-panel.open { display: flex; }
.hs-chat-head {
  background: #0c1a26; color: #fff; padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
}
.hs-chat-head .hs-title { font-weight: 700; font-size: 14px; letter-spacing: .2px; }
.hs-chat-head .hs-sub { font-size: 11.5px; opacity: .72; margin-top: 2px; }
.hs-chat-head .hs-close {
  margin-left: auto; background: transparent; border: 0; color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer; opacity: .7; padding: 0 2px;
}
.hs-chat-head .hs-close:hover { opacity: 1; }
.hs-chat-body {
  flex: 1; overflow-y: auto; padding: 16px 14px 8px;
  background: #f6f8f9; scroll-behavior: smooth;
}
.hs-msg { display: flex; margin-bottom: 10px; }
.hs-msg .hs-bubble {
  max-width: 84%; padding: 10px 13px; border-radius: 13px;
  font-size: 13.5px; white-space: pre-wrap; word-break: break-word;
}
.hs-msg.bot .hs-bubble { background: #fff; border: 1px solid rgba(12,26,38,.08); border-bottom-left-radius: 5px; }
.hs-msg.me { justify-content: flex-end; }
.hs-msg.me .hs-bubble { background: #0c1a26; color: #fff; border-bottom-right-radius: 5px; }
.hs-msg.human .hs-bubble { background: #eef7f1; border: 1px solid rgba(12,80,40,.14); border-bottom-left-radius: 5px; }
.hs-msg.human .hs-bubble::before { content: "\5DE5\7A0B\5E08"; display: block; font-size: 10px; letter-spacing: .04em; color: #3a7a52; margin-bottom: 3px; }
.hs-msg.sys { justify-content: center; }
.hs-msg.sys .hs-bubble { background: transparent; color: #7b8a96; font-size: 12px; padding: 2px; }
.hs-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 2px 12px; }
.hs-chip {
  background: #fff; border: 1px solid rgba(226,87,15,.45); color: #c2490c;
  padding: 7px 11px; border-radius: 999px; font-size: 12.5px; cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.hs-chip:hover { background: #e2570f; color: #fff; border-color: #e2570f; }
.hs-chat-foot { padding: 10px 12px 12px; border-top: 1px solid rgba(12,26,38,.08); background: #fff; }
.hs-inputrow { display: flex; gap: 8px; align-items: flex-end; }
.hs-inputrow textarea {
  flex: 1; resize: none; border: 1px solid rgba(12,26,38,.18); border-radius: 10px;
  padding: 9px 11px; font: inherit; font-size: 13.5px; max-height: 96px; min-height: 40px;
  outline: none; color: inherit; background: #fff;
}
.hs-inputrow textarea:focus { border-color: #e2570f; }
.hs-send {
  background: #e2570f; color: #fff; border: 0; border-radius: 10px;
  width: 40px; height: 40px; cursor: pointer; display: grid; place-items: center; flex: none;
}
.hs-send:disabled { opacity: .45; cursor: default; }
.hs-send svg { width: 17px; height: 17px; }
.hs-note { font-size: 11px; color: #8a97a2; margin-top: 7px; text-align: center; }
.hs-typing { display: inline-flex; gap: 3px; }
.hs-typing i {
  width: 5px; height: 5px; border-radius: 50%; background: #b7c2ca;
  animation: hsBlink 1.2s infinite;
}
.hs-typing i:nth-child(2) { animation-delay: .18s; }
.hs-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes hsBlink { 0%,60%,100% { opacity: .28; } 30% { opacity: 1; } }
.hs-escalate { background: #fff; border: 1px solid rgba(12,26,38,.1); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.hs-escalate p { margin: 0 0 9px; font-size: 12.5px; color: #4b5a66; }
.hs-escalate input {
  width: 100%; box-sizing: border-box; margin-bottom: 7px; padding: 9px 10px;
  border: 1px solid rgba(12,26,38,.16); border-radius: 9px; font: inherit; font-size: 13px;
}
.hs-escalate button {
  width: 100%; background: #0c1a26; color: #fff; border: 0; border-radius: 9px;
  padding: 10px; font: inherit; font-weight: 600; cursor: pointer;
}
.hs-escalate .hs-alt { text-align: center; font-size: 11.5px; margin-top: 8px; color: #8a97a2; }
.hs-escalate .hs-alt a { color: #c2490c; }
@media (max-width: 520px) {
  .hs-chat-panel { right: 0; bottom: 0; width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .hs-chat-btn { right: 14px; bottom: 14px; }
  .hs-chat-btn span.hs-btn-label { display: none; }
  .hs-chat-btn { padding: 14px; }
}

/* 微信二维码（2026-11-14：联系方式统一用二维码，不显示电话） */
.hs-bubble .hs-qr {
  display: block; width: 150px; max-width: 100%; height: auto;
  margin: 8px 0 4px; padding: 4px; background: #fff;
  border-radius: 8px; border: 1px solid rgba(12,26,38,.10);
}
