/* 悬浮客服按钮 开始 */

.kf-btn {
  position: fixed;
  bottom: 60px;
  right: 60px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  text-align: center;
  line-height: 60px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 2px 10px #0002;
  z-index: 998;
}
.kf-btn img {
  height: 100%;
  width: auto;
}

.kf-btn:hover {
  transform: scale(1.5);
}
/* 聊天窗口 */
.kf-box {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 320px;
  height: 480px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 20px #0002;
  display: none;
  flex-direction: column;
  z-index: 9998;
}
.kf-head {
  background: rgb(212, 141, 74);
  color: #fff;
  padding: 15px;
  border-radius: 12px 12px 0 0;
  text-align: center;
  font-weight: bold;
  position: relative;
}
/* 关闭收起按钮 */
/* 关闭收起按钮 —— 修复版 */
.close-btn {
  position: absolute;
  right: 12px; /* 改到右边，更符合习惯 */
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #ffffff; /* 白色文字 */
  background: rgba(0, 0, 0, 0.2); /* 加个小背景，保证看得见 */
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100; /* 确保在最上层 */
}
.kf-content {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: #f3f4f7;
}
.msg-item {
  margin-bottom: 12px;
  max-width: 75%;
}
.msg-left {
  text-align: left;
}
.msg-right {
  text-align: right;
  margin-left: auto;
}
.msg-left .text {
  background: #f3f4f7;
  padding: 8px 12px;
  border-radius: 15px 15px 15px 0;
  display: inline-block;
}
.msg-right .text {
  background: #0066ff;
  color: #fff;
  padding: 8px 12px;
  border-radius: 15px 15px 0 15px;
  display: inline-block;
}
.time {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}
.kf-input {
  display: flex;
  padding: 10px;
  border-top: 1px solid #eee;
}
.kf-input input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 10px 15px;
  outline: none;
}
.kf-input button {
  margin-left: 8px;
  border: none;
  background: #0066ff;
  color: #fff;
  border-radius: 20px;
  padding: 0 16px;
  cursor: pointer;
}

/* 悬浮客服按钮  结束 */
