/* 在线客服聊天页（参考对味客服：气泡列表 + 底部输入条 + 轮询） */
.cs-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #f4f5f9;
}
.cs-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs-list::-webkit-scrollbar { display: none; }

.cs-notice {
  align-self: center;
  max-width: 90%;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.6;
  color: #8a90a2;
  background: rgba(0, 0, 0, .045);
  border-radius: 8px;
  padding: 6px 10px;
}
.cs-empty {
  margin: auto;
  text-align: center;
  font-size: 13px;
  line-height: 1.9;
  color: #9aa0b0;
  padding: 20px;
}

.cs-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 76%; }
.cs-msg.mine { align-self: flex-end; align-items: flex-end; }
.cs-bubble {
  padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.55;
  background: #fff; color: #24262c; box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .18);
  border-top-left-radius: 4px; word-break: break-word; white-space: pre-wrap;
}
.cs-msg.mine .cs-bubble {
  background: linear-gradient(120deg, #ff5252, #e01f1f); color: #fff;
  border-top-left-radius: 14px; border-top-right-radius: 4px;
}
.cs-time { font-size: 10.5px; color: #b3b7c0; margin-top: 4px; padding: 0 4px; }

.cs-bar {
  flex: none; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.cs-input {
  flex: 1; min-width: 0; height: 42px; border: 1px solid var(--line); border-radius: 999px;
  padding: 0 16px; font-size: 14px; outline: none; background: #fafafb; font-family: inherit;
}
.cs-input:focus { border-color: #ffb3b3; background: #fff; }
.cs-send {
  flex: none; border: 0; border-radius: 999px; padding: 0 20px; height: 42px;
  background: linear-gradient(120deg, #ff5252, #e01f1f); color: #fff;
  font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer;
  box-shadow: 0 8px 18px -8px rgba(224, 31, 31, .95);
}
.cs-send:active { opacity: .86; }
