/* 电脑 + 手机自适应聊天窗口 */
.chatModal {
  position: fixed;
  right: 15px;
  bottom: 100px;
  width: 310px;
  height: 470px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.15);
  display: none;
  z-index: 99999;
  font-family: "Microsoft YaHei", sans-serif;
  overflow: hidden;
}

/* 手机端自动全屏 */
@media (max-width: 500px) {
  .chatModal {
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
}

.chatHeader {
  background: #0078d7;
  color: #fff;
  padding: 14px;
  text-align: center;
  font-weight: bold;
  font-size: 15px;
  position: relative;
}

/* 关闭按钮样式 */
.chatClose {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 0 5px;
}

.chatBody {
  height: calc(100% - 120px);
  padding: 12px;
  overflow-y: auto;
  background: #f7f7f7;
}

.chatInput {
  display: flex;
  padding: 10px;
  border-top: 1px solid #eee;
  background: #fff;
}

.chatInput input {
  flex: 1;
  padding: 9px;
  border: 1px solid #ddd;
  border-radius: 6px;
  outline: none;
  font-size: 14px;
}

.chatInput button {
  background: #0078d7;
  color: #fff;
  border: none;
  padding: 0 14px;
  margin-left: 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.msg {
  margin: 6px 0;
  max-width: 75%;
  word-break: break-word;
  font-size: 14px;
}

.msgUser {
  text-align: right;
}

.msgUser span {
  background: #0078d7;
  color: #fff;
  padding: 7px 11px;
  border-radius: 8px;
  display: inline-block;
}

.msgBot {
  text-align: left;
}

.msgBot span {
  background: #fff;
  padding: 7px 11px;
  border: 1px solid #ddd;
  border-radius: 8px;
  display: inline-block;
  color: #333;
}