/* 宇泉国际物流 · AI 客服悬浮窗样式（蓝白物流风，随站点主题） */
#yq-ai-fab {
  position: fixed; right: 18px; bottom: 24px; z-index: 9990;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #0f62d9, #0a47a1);
  color: #fff; border: none; box-shadow: 0 8px 24px rgba(15,98,217,.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; cursor: pointer; font-family: inherit;
  transition: transform .15s;
}
#yq-ai-fab:hover { transform: scale(1.06); }
#yq-ai-fab .fab-icon { font-size: 20px; line-height: 1; }
#yq-ai-fab .fab-text { font-size: 11px; font-weight: 600; }

#yq-ai-panel {
  position: fixed; right: 18px; bottom: 96px; z-index: 9991;
  width: 360px; max-width: calc(100vw - 24px);
  height: 540px; max-height: calc(100vh - 130px);
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(15,23,42,.25);
  display: none; flex-direction: column;
  font-family: "PingFang SC","Microsoft YaHei",sans-serif;
}
#yq-ai-panel.open { display: flex; }

#yq-ai-head {
  background: linear-gradient(135deg, #0f62d9, #0a47a1);
  color: #fff; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
#yq-ai-head .avatar {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
#yq-ai-head .who { flex: 1; min-width: 0; }
#yq-ai-head .name { font-size: 15px; font-weight: 700; }
#yq-ai-head .status { font-size: 11.5px; color: rgba(255,255,255,.85); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
#yq-ai-head .status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; display: inline-block;
}
#yq-ai-head .ops { display: flex; gap: 6px; }
#yq-ai-head .ops button {
  width: 28px; height: 28px; border-radius: 8px; border: none;
  background: rgba(255,255,255,.15); color: #fff; cursor: pointer; font-size: 14px;
}
#yq-ai-head .ops button:hover { background: rgba(255,255,255,.3); }

#yq-ai-quick {
  padding: 8px 10px; background: #f2f7ff; border-bottom: 1px solid #eef2f7;
  display: flex; gap: 6px; overflow-x: auto; flex-shrink: 0;
  scrollbar-width: thin;
}
#yq-ai-quick button {
  flex-shrink: 0; border: 1px solid #dce9fb; background: #fff; color: #334155;
  font-size: 12px; border-radius: 999px; padding: 5px 11px; cursor: pointer;
}
#yq-ai-quick button:hover { border-color: #0f62d9; color: #0f62d9; }

#yq-ai-body {
  flex: 1; overflow-y: auto; padding: 14px 12px; background: #f8fafc;
  -webkit-overflow-scrolling: touch;
}
.yq-msg { display: flex; margin-bottom: 12px; gap: 8px; }
.yq-msg .m-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: #e8f1ff; display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.yq-msg .bubble {
  max-width: 78%; background: #fff; border-radius: 4px 14px 14px 14px;
  padding: 9px 12px; font-size: 13.5px; line-height: 1.65; color: #0f172a;
  box-shadow: 0 1px 4px rgba(15,23,42,.06); white-space: pre-wrap; word-break: break-word;
}
.yq-msg.user { justify-content: flex-end; }
.yq-msg.user .bubble {
  background: #0f62d9; color: #fff; border-radius: 14px 4px 14px 14px;
}
.yq-msg .bubble .human-card { margin-top: 8px; display: grid; gap: 4px; }
.yq-msg .bubble .human-card a {
  display: block; background: #f2f7ff; color: #0f62d9; border-radius: 8px;
  padding: 6px 10px; font-size: 12.5px; text-decoration: none; font-weight: 600;
}

#yq-ai-foot { border-top: 1px solid #eef2f7; padding: 10px; background: #fff; flex-shrink: 0; }
#yq-ai-foot .row { display: flex; gap: 8px; }
#yq-ai-input {
  flex: 1; min-width: 0; height: 40px; border: 1.5px solid #cdd6e3; border-radius: 10px;
  padding: 0 12px; font-size: 14px; outline: none; font-family: inherit;
}
#yq-ai-input:focus { border-color: #0f62d9; }
#yq-ai-send {
  height: 40px; padding: 0 18px; border: none; border-radius: 10px;
  background: #0f62d9; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; flex-shrink: 0;
}
#yq-ai-send:disabled { background: #9dbdf7; }

@media (max-width: 480px) {
  #yq-ai-panel {
    right: 0; left: 0; bottom: 0; top: 0;
    width: 100vw; height: 100vh; max-height: none;
    border-radius: 0;
  }
  #yq-ai-fab { right: 14px; bottom: 18px; }
}
