/* quote-chat.css — 互动问答式报价 · 对话层样式
   与 bj 报价页视觉保持一致（暖色主色 #f68b2e / 卡片圆角 / 浅色底）。
   仅新增 .cxx-chat-* 命名空间，不影响既有样式。 */
.cxx-chat-entry{display:inline-flex;align-items:center;gap:6px}
.cxx-chat-entry-ic{font-size:15px;line-height:1}

.cxx-chat-layer{position:fixed;inset:0;z-index:9999;display:none}
.cxx-chat-layer.open{display:block}
.cxx-chat-mask{position:absolute;inset:0;background:rgba(20,12,4,.45)}
.cxx-chat-panel{position:absolute;right:24px;bottom:24px;top:24px;width:min(440px,calc(100vw - 32px));
  background:#fff;border-radius:18px;display:flex;flex-direction:column;overflow:hidden;
  box-shadow:0 24px 64px rgba(60,30,0,.28)}
body.cxx-chat-open{overflow:hidden}

.cxx-chat-hd{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:16px 18px;background:linear-gradient(135deg,#fff6ec,#fff);border-bottom:1px solid #f1e3d3}
.cxx-chat-title{display:flex;align-items:center;gap:12px}
.cxx-chat-title b{font-size:17px;color:#3c2a17}
.cxx-chat-logo{width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#f68b2e,#ff9d3c);
  color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;font-size:19px}
.cxx-chat-sub{font-size:12px;color:#a08a72;margin-top:2px}
.cxx-chat-close{border:0;background:#fff;width:32px;height:32px;border-radius:10px;font-size:20px;
  color:#a08a72;cursor:pointer;line-height:1}
.cxx-chat-close:hover{background:#fdeedd;color:#d7660e}

.cxx-chat-progress{padding:12px 18px;border-bottom:1px solid #f5efe7;background:#fffdfa}
.cxx-chat-progress-txt{font-size:12px;color:#a08a72;margin-bottom:8px}
/* 进度条 */
.cxx-chat-progress-bar{height:4px;border-radius:999px;background:#f0e8dd;overflow:hidden;margin-bottom:8px}
.cxx-chat-progress-bar span{display:block;height:100%;border-radius:999px;
  background:linear-gradient(90deg,#ff9d3c,#f68b2e);transition:width .3s ease}
.cxx-chat-chips{display:flex;flex-wrap:wrap;gap:6px}
.cxx-chip{font-size:12px;padding:4px 10px;border-radius:999px;background:#f4f1ec;color:#9a8f82;border:1px solid #eae3d8}
.cxx-chip.ok{background:#eefaf0;color:#2f9e57;border-color:#cdeed8}

/* 快捷选项栏（点选代替打字） */
.cxx-chat-chips-bar{display:flex;flex-wrap:wrap;gap:8px;padding:10px 14px 0;background:#fff}
.cxx-quick-chip{border:1px solid #e6dccd;background:#fffdfa;color:#7a6a55;font-size:13px;
  border-radius:999px;padding:7px 16px;cursor:pointer;line-height:1.3;transition:all .15s}
.cxx-quick-chip:hover{border-color:#f68b2e;color:#d7660e;background:#fff6ec}

/* 语音输入按钮 */
.cxx-chat-mic{border:1px solid #e6dccd;background:#fffdfa;border-radius:12px;width:44px;
  font-size:17px;line-height:1;cursor:pointer;flex-shrink:0;transition:all .15s}
.cxx-chat-mic:hover{border-color:#f68b2e;background:#fff6ec}
.cxx-chat-mic.is-listening{background:#ff4d4f;border-color:#ff4d4f;animation:cxxMicPulse 1s infinite}
@keyframes cxxMicPulse{0%,100%{opacity:1}50%{opacity:.55}}

/* 低置信度待核对高亮 */
.cxx-confirm-line.is-unsure{background:#fff8ec;border-radius:8px;padding:6px 8px;margin:2px 0}
.cxx-confirm-line.is-unsure .cxx-confirm-txt{color:#8a5a12}
.cxx-confirm-line.is-unsure .cxx-confirm-ok{border-color:#ffddaa;color:#b4611b;background:#fff}

.cxx-chat-body{flex:1;overflow-y:auto;padding:16px 18px;display:flex;flex-direction:column;gap:10px;background:#faf7f2}
.cxx-chat-msg{max-width:82%;padding:10px 14px;border-radius:14px;font-size:14px;line-height:1.65;
  white-space:pre-wrap;word-break:break-word}
.cxx-chat-msg.bot{align-self:flex-start;background:#fff;color:#3c2a17;border:1px solid #efe6d9;border-bottom-left-radius:4px}
.cxx-chat-msg.me{align-self:flex-end;background:linear-gradient(135deg,#f68b2e,#ff9d3c);color:#fff;border-bottom-right-radius:4px}
/* 确认回显卡片（带值 + 「对的」按钮）—— P0-3 */
.cxx-chat-msg.confirm{align-self:stretch;max-width:92%;background:#eefaf0;color:#2f7d4f;
  border:1px solid #cdeed8;border-radius:14px;padding:10px 14px;font-size:13px}
.cxx-confirm-title{font-weight:700;margin-bottom:6px}
.cxx-confirm-line{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:4px 0}
.cxx-confirm-txt{flex:1;min-width:0;word-break:break-all}
.cxx-confirm-ok{flex-shrink:0;border:1px solid #b9e6c9;background:#fff;color:#2f9e57;font-size:12px;
  border-radius:999px;padding:4px 14px;cursor:pointer;line-height:1.4}
.cxx-confirm-ok:hover{background:#e4f6ea}
.cxx-confirm-ok:disabled{border-color:#dfe8e2;color:#a8b8ae;background:#f6f9f7;cursor:default}
.cxx-confirm-line.is-confirmed .cxx-confirm-txt{color:#2f9e57}

/* 冲突裁决卡片（两条信息对不上时让用户选）—— P0-3 */
.cxx-chat-msg.conflict{align-self:stretch;max-width:96%;background:#fff8ec;color:#8a5a12;
  border:1px solid #ffddaa;border-radius:14px;padding:12px 14px;font-size:13px}
.cxx-conflict-title{font-weight:700;margin-bottom:8px}
.cxx-conflict-line{padding:8px 0;border-top:1px dashed #f0dcbe}
.cxx-conflict-line:first-of-type{border-top:0}
.cxx-conflict-info{line-height:1.6;margin-bottom:8px;word-break:break-all}
.cxx-conflict-actions{display:flex;gap:8px}
.cxx-conflict-btn{border:1px solid #e6dccd;background:#fff;color:#8a7a66;font-size:13px;
  border-radius:10px;padding:7px 16px;cursor:pointer;line-height:1.4}
.cxx-conflict-btn:hover{background:#faf6f0}
.cxx-conflict-btn.primary{background:linear-gradient(135deg,#ff6a00,#f04a00);color:#fff;border:0;font-weight:700}
.cxx-conflict-btn.primary:hover{opacity:.92}
.cxx-conflict-line.is-resolved .cxx-conflict-actions{display:none}
.cxx-conflict-picked{display:inline-block;font-size:12px;color:#2f9e57;background:#eefaf0;
  border:1px solid #cdeed8;border-radius:999px;padding:4px 12px}

.cxx-chat-ft{display:flex;gap:8px;padding:12px 14px;border-top:1px solid #f1e3d3;background:#fff}
.cxx-chat-input{flex:1;border:1px solid #e6dccd;border-radius:12px;padding:12px 14px;font-size:14px;
  outline:none;background:#fffdfa;color:#3c2a17;min-width:0}
.cxx-chat-input:focus{border-color:#f68b2e;box-shadow:0 0 0 3px rgba(246,139,46,.14)}
.cxx-chat-send{border:0;border-radius:12px;padding:0 20px;font-size:14px;font-weight:700;cursor:pointer;
  background:linear-gradient(135deg,#ff6a00,#f04a00);color:#fff;white-space:nowrap}
.cxx-chat-send:disabled{opacity:.6;cursor:not-allowed}

.cxx-chat-bar{display:flex;gap:8px;padding:0 14px 14px;background:#fff}
.cxx-chat-skip,.cxx-chat-apply{flex:1;border-radius:12px;padding:12px 0;font-size:14px;cursor:pointer;border:1px solid #e6dccd}
.cxx-chat-skip{background:#fff;color:#8a7a66}
.cxx-chat-skip:hover{background:#faf6f0}
.cxx-chat-apply{background:linear-gradient(135deg,#ff6a00,#f04a00);color:#fff;border:0;font-weight:700}
.cxx-chat-apply:disabled{opacity:.5;cursor:not-allowed}

/* 打印时绝不出现对话层 */
@media print{
  .cxx-chat-layer{display:none !important}
}
/* 窄屏：对话层占满，避免挤压 */
@media (max-width: 640px){
  .cxx-chat-panel{inset:0;width:100%;border-radius:0;top:0;bottom:0;right:0}
}
