/* 悬浮客服按钮样式 - 更新版 */
.floating-service {
  position: fixed;
  right: 20px;
  bottom: 50%;
  transform: translateY(50%);
  z-index: 9998; /* 降低z-index确保在弹窗下方 */
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* 服务项容器 */
.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 客服按钮 */
.service-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.3s ease;
}

.service-btn i {
  color: white;
  font-size: 28px;
}

/* 文字标签 */
.service-label {
  margin-top: 8px;
  font-size: 12px;
  color: #333;
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
  font-weight: 500;
}

/* 平台按钮颜色 */
.facebook-btn { background: #3b5998; }
.whatsapp-btn { background: #25D366; }
.weixin-btn { background: #09b83e; }

/* 二维码弹窗 */
.qr-popup {
  position: absolute;
  right: 75px;
  top: 0;
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  width: 160px;
  text-align: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.qr-popup img {
  width: 120px;
  height: 120px;
  display: block;
  margin: 0 auto 10px;
}

.qr-popup p {
  font-size: 13px;
  color: #333;
  margin: 0;
  font-weight: 500;
}

.close-btn {
  position: absolute;
  top: 5px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f1f1f1;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .floating-service {
    right: 10px;
    bottom: 100px;
    transform: none;
  }
  
  .service-btn {
    width: 50px;
    height: 50px;
  }
  
  .service-btn i {
    font-size: 24px;
  }
  
  .service-label {
    font-size: 11px;
    padding: 1px 6px;
  }
  
  .qr-popup {
    right: 60px;
    width: 140px;
    padding: 12px;
  }
  
  .qr-popup img {
    width: 100px;
    height: 100px;
  }
}

/* 弹窗显示时隐藏客服按钮 */
body.modal-open .floating-service {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s ease;
}