/* 柏华网络 - 在线客服聊天窗口 */
#lc-root{position:fixed;right:22px;bottom:150px;z-index:2147483001;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
@media (max-width:640px){#lc-root{right:14px;bottom:138px}}

/* 启动按钮 */
#lc-launch{width:52px;height:52px;border-radius:50%;border:0;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(145deg,#4f8cff,#2563eb);box-shadow:0 6px 20px rgba(37,99,235,.28),0 2px 6px rgba(15,23,42,.12);transition:transform .22s cubic-bezier(.34,1.56,.64,1),box-shadow .22s ease;position:relative;outline:none;-webkit-tap-highlight-color:transparent}
#lc-launch:hover{transform:translateY(-3px) scale(1.06);box-shadow:0 10px 26px rgba(37,99,235,.36)}
#lc-launch svg{width:26px;height:26px;fill:currentColor;display:block}
#lc-badge{position:absolute;top:-3px;right:-3px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#ef4444;color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center;box-shadow:0 2px 6px rgba(0,0,0,.2)}
#lc-badge[hidden]{display:none}
@media (max-width:640px){#lc-launch{width:48px;height:48px}#lc-launch svg{width:24px;height:24px}}

/* 聊天面板 */
#lc-panel{position:absolute;right:0;bottom:64px;width:340px;height:480px;max-height:calc(100vh - 180px);background:#fff;border:1px solid #e8edf3;border-radius:16px;box-shadow:0 18px 50px rgba(15,23,42,.2);display:flex;flex-direction:column;overflow:hidden;opacity:0;visibility:hidden;transform:translateY(12px) scale(.97);transform-origin:bottom right;transition:opacity .22s ease,transform .22s cubic-bezier(.34,1.4,.64,1),visibility .22s}
#lc-panel.lc-open{opacity:1;visibility:visible;transform:translateY(0) scale(1)}

/* 头部 */
.lc-head{display:flex;align-items:center;gap:11px;padding:14px 16px;background:linear-gradient(135deg,#2563eb,#4f8cff);color:#fff;flex-shrink:0}
.lc-avatar{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.lc-avatar svg{width:22px;height:22px;fill:#fff}
.lc-head-info{flex:1;min-width:0}
.lc-title{font-size:15px;font-weight:700;line-height:1.2}
.lc-status{font-size:11.5px;opacity:.9;margin-top:3px;display:flex;align-items:center;gap:5px}
.lc-dot{width:7px;height:7px;border-radius:50%;background:#4ade80;box-shadow:0 0 0 3px rgba(74,222,128,.25)}
.lc-close{width:28px;height:28px;border-radius:50%;border:0;background:rgba(255,255,255,.15);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s}
.lc-close:hover{background:rgba(255,255,255,.28)}
.lc-close svg{width:15px;height:15px;fill:currentColor}

/* 消息区 */
.lc-body{flex:1;overflow-y:auto;padding:14px;background:#f7f9fc;scroll-behavior:smooth}
.lc-body::-webkit-scrollbar{width:5px}
.lc-body::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}
.lc-msg{display:flex;margin-bottom:12px;gap:8px;align-items:flex-end}
.lc-msg.lc-me{flex-direction:row-reverse}
.lc-bubble{max-width:78%;padding:9px 13px;border-radius:12px;font-size:13.5px;line-height:1.6;word-break:break-word;white-space:pre-wrap}
.lc-msg.lc-agent .lc-bubble,.lc-msg.lc-sys .lc-bubble{background:#fff;color:#1e293b;border:1px solid #e8edf3;border-bottom-left-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.03)}
.lc-msg.lc-me .lc-bubble{background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;border-bottom-right-radius:3px}
.lc-msg.lc-sys{justify-content:center}
.lc-msg.lc-sys .lc-bubble{background:#eef2f7;color:#64748b;font-size:12px;border:0;max-width:92%;text-align:center}
.lc-time{font-size:10.5px;color:#9ca3af;margin-top:4px}
.lc-msg.lc-me .lc-time{text-align:right}
.lc-bubble img{display:block;max-width:220px;max-height:180px;border-radius:7px;margin-bottom:5px;cursor:zoom-in}
.lc-bubble a{color:inherit;text-decoration:underline;word-break:break-all}
.lc-msg.lc-agent .lc-bubble a{color:#2563eb}
.lc-file{display:flex;align-items:center;gap:7px;min-width:150px}
.lc-file .fico{font-size:19px;line-height:1}
.lc-file .finfo{min-width:0;line-height:1.45}
.lc-file .fname{font-size:12.5px;font-weight:600;display:block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lc-file .fsize{font-size:10.5px;opacity:.7}

/* 快捷问题 */
.lc-quick{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 10px;background:#f7f9fc}
.lc-quick button{border:1px solid #dbe5f1;background:#fff;color:#2563eb;font-size:12px;padding:6px 10px;border-radius:14px;cursor:pointer;transition:all .18s}
.lc-quick button:hover{background:#2563eb;color:#fff;border-color:#2563eb}

/* 输入区 */
.lc-foot{display:flex;align-items:center;gap:8px;padding:11px 12px;background:#fff;border-top:1px solid #eef2f6;flex-shrink:0}
#lc-input{flex:1;min-width:0;height:38px;border:1px solid #dbe3ec;border-radius:19px;padding:0 14px;font-size:13.5px;outline:none;transition:border-color .2s;font-family:inherit}
#lc-input:focus{border-color:#4f8cff}
.lc-tool{width:34px;height:34px;border-radius:9px;border:1px solid #dbe3ec;background:#f8fafc;color:#475569;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .18s,color .18s,border-color .18s}
.lc-tool:hover{background:#eff6ff;border-color:#93c5fd;color:#2563eb}
.lc-tool svg{width:17px;height:17px;fill:currentColor}
#lc-send{width:38px;height:38px;border-radius:50%;border:0;background:linear-gradient(135deg,#4f8cff,#2563eb);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:transform .18s,opacity .18s}
#lc-send:hover{transform:scale(1.07)}
#lc-send:disabled{opacity:.5;cursor:not-allowed;transform:none}
#lc-send svg{width:18px;height:18px;fill:currentColor}
@media (max-width:640px){
  #lc-panel{width:min(340px,calc(100vw - 28px));height:min(480px,calc(100vh - 160px))}
}
