/* 在线客服台 · 共享样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: #1f2329; background: #f0f2f5; }

.cs-btn { border: none; background: #2f6bff; color: #fff; border-radius: 20px; padding: 0 20px; font-size: 14px; cursor: pointer; }
.cs-btn:disabled { background: #b9c6e8; cursor: not-allowed; }
.cs-input { border: 1px solid #e3e6eb; border-radius: 20px; padding: 10px 14px; font-size: 14px; outline: none; }
.cs-input:focus { border-color: #2f6bff; }

/* 消息气泡：用 inline-block + text-align 替代 flex，避免 flex 把气泡压成单字 */
.cs-msg { margin-bottom: 14px; text-align: left; }
.cs-msg.cs-customer { text-align: right; }
.cs-msg > div {
  display: inline-block;
  max-width: 74%;
  vertical-align: top;
  text-align: left;
}
.cs-msg .cs-bubble {
  display: inline-block;
  max-width: 100%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: normal !important; /* 强制按词换行，防止被外部/缓存 CSS 覆盖成 break-all */
  overflow-wrap: break-word;     /* 超长无空格内容才强制断行 */
}
.cs-msg.cs-customer .cs-bubble { background: #2f6bff; color: #fff; border-top-right-radius: 3px; }
.cs-msg.cs-admin .cs-bubble { background: #fff; color: #1f2329; border: 1px solid #eef0f3; border-top-left-radius: 3px; }
.cs-msg .cs-who { font-size: 11px; color: #8a9099; margin-bottom: 3px; }
.cs-tip { text-align: center; font-size: 12px; color: #b0b6bf; margin: 6px 0; }

/* 后台连接/登录标签 */
.cs-conn { font-size: 12px; padding: 2px 10px; border-radius: 10px; background: #e8f7f0; color: #1aa97a; }
.cs-conn.off { background: #fdeaea; color: #e54848; }
