/* 悬浮窗容器：贴紧页面右侧，垂直排列两个按钮 */
.float-widget {
  position: fixed;
  right: 10; /* 完全贴紧页面右侧 */
  top: 50%; /* 垂直居中 */
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* 按钮贴右对齐 */
  gap: 0px; /* 两个按钮贴在一起 */
  z-index: 9999;
}
/* 触发按钮：保持在悬浮窗根容器内 */
.toggle-btn {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #333;
  cursor: pointer;
  position: relative;
}
.toggle-btn .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff3d3d;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: bold;
}

/* 二维码面板：在触发按钮左侧展开（不影响页面内容） */
.panel {
  display: none;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  padding: 16px;
  width: 300px;
  text-align: center;
  
  position: absolute;
  right: 50px; /* 与触发按钮保持10px间距 */
  top: 50%;
  transform: translateY(-50%);
}

/* 二维码组+内容：保持居中 */
.qrcode-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}
.qrcode-item {
  width: 45%;
}
.qrcode-item img {
  width: 100px;
  height: 100px;
  margin-bottom: 8px;
  border: 1px solid #eee;
}
.qrcode-item h4 {
  font-size: 14px;
  color: #333;
}
.qrcode-item p {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

.close-btn {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #333;
  cursor: pointer;
  margin: 0 auto;
}

.toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; 
  height: 48px;
  border-radius: 0; 
  background-color: transparent; 
  color: #333;
  cursor: pointer;
  box-shadow: none; 
}

.svg-icon {
  width: 24px; 
  height: 24px;
  vertical-align: middle;
  fill: currentColor;
  object-fit: contain;
  transition: all 0.2s ease;
}


.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  padding: 3px 7px;
  font-size: 12px;
  border-radius: 12px;
  background-color: #ff4d4f;
  color: #fff;
}

/* 旧版悬浮窗样式 */
#kefu {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  background: #fff;
  border-radius: 8px 0 0 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: none;
  z-index: 9999;
}

#kefu .top {
  background: #f0f0f0;
  padding: 10px;
  text-align: center;
  font-weight: bold;
  border-radius: 8px 0 0 0;
}

#kefu .middle {
  padding: 10px;
  text-align: center;
}

#kefu .middle b {
  display: block;
  margin-top: 10px;
  font-size: 12px;
}

/* 为悬浮窗内的图片添加更灵活的样式 */
#kefu .middle img {
  max-width: 80px;
  max-height: 80px;
  margin: 5px 0;
}

/* 二维码图片设置固定尺寸 */
#kefu .middle b + img {
  width: 80px;
  height: 80px;
}

/* 售后服务小图标保持原始尺寸 */
#kefu .middle a img {
  width: auto;
  height: auto;
  max-width: 80px;
  max-height: 80px;
}

.right_bar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 9998;
}