/* ===== 在线客服窗口 ===== */
#chatWidget{position:static;z-index:9999;font-family:-apple-system,BlinkMacSystemFont,"Microsoft YaHei",Arial,sans-serif;}
.chat-panel{position:fixed;right:18px;bottom:18px;width:330px;max-height:480px;background:#fff;border-radius:10px;box-shadow:0 8px 30px rgba(0,0,0,.18);display:none;flex-direction:column;overflow:hidden;z-index:9999;}
.chat-header{background:#409EFF;color:#fff;padding:10px 14px;display:flex;justify-content:space-between;align-items:center;font-size:14px;}
.chat-header button{background:none;border:none;color:#fff;font-size:22px;line-height:1;cursor:pointer;}
.chat-body{flex:1;overflow-y:auto;padding:12px;background:#f5f7fa;min-height:220px;max-height:320px;}
.chat-msg{margin-bottom:10px;max-width:85%;padding:8px 10px;border-radius:8px;font-size:13px;line-height:1.5;word-break:break-word;white-space:pre-wrap;}
.chat-msg.bot{background:#fff;border:1px solid #ebeef5;}
.chat-msg.user{background:#409EFF;color:#fff;margin-left:auto;}
.chat-form{padding:10px;border-top:1px solid #eee;}
.chat-input{width:100%;box-sizing:border-box;margin-bottom:6px;padding:6px 8px;border:1px solid #dcdfe6;border-radius:5px;font-size:13px;}
.chat-textarea{width:100%;box-sizing:border-box;height:56px;padding:6px 8px;border:1px solid #dcdfe6;border-radius:5px;font-size:13px;resize:none;margin-bottom:8px;font-family:inherit;}
.chat-btns{display:flex;gap:8px;}
.chat-btn{flex:1;padding:7px 0;border:1px solid #dcdfe6;background:#fff;border-radius:5px;cursor:pointer;font-size:13px;}
.chat-btn-primary{background:#409EFF;border-color:#409EFF;color:#fff;}
.chat-btn-primary:hover{background:#66b1ff;}
/* 快捷标签行：左关键词 + 右转人工 */
.chat-quick{display:flex;justify-content:space-between;align-items:center;gap:6px;padding:8px 10px;border-top:1px solid #f0f0f0;flex-wrap:wrap;}
.chat-quick-left{display:flex;gap:6px;flex-wrap:wrap;}
.chat-tag{font-size:12px;line-height:1;color:#409EFF;background:#ecf5ff;border-radius:10px;padding:5px 9px;cursor:pointer;user-select:none;white-space:nowrap;}
.chat-tag:hover{background:#409EFF;color:#fff;}
.chat-tag-human{color:#f56c6c;background:#fef0f0;}
.chat-tag-human:hover{background:#f56c6c;color:#fff;}
.chat-tag-active{outline:2px solid rgba(245,108,108,.5);font-weight:600;}
/* 转人工邮箱填写（默认隐藏） */
.chat-email-wrap{display:none;margin-bottom:6px;}
.chat-email-wrap.chat-show{display:block;}
@media (max-width:480px){
    .chat-panel{width:calc(100vw - 36px);right:18px;left:18px;}
}
