/* ===== 悬浮客服组件 ===== */
.float-service {
  position: fixed;
  right: 20px;
  bottom: 30%;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity var(--transition, 0.3s ease);
}

.float-service-item {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: #2563EB;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.3s, transform 0.3s;
}

.float-service-item:hover {
  background: #1d4ed8;
  transform: scale(1.06);
}

.float-service-item svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex-shrink: 0;
}

/* 悬浮提示标签 */
.float-service-label {
  position: absolute;
  right: 58px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  color: #2563EB;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.float-service-label::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #fff;
}

.float-service-item:hover .float-service-label {
  opacity: 1;
}

/* 微信二维码弹出层 */
.wechat-popup {
  position: absolute;
  right: 58px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

.wechat-popup.active {
  display: flex;
}

.wechat-popup::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #fff;
}

.wechat-qr-placeholder {
  width: 120px;
  height: 120px;
  background: #f3f4f6;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 11px;
  text-align: center;
  line-height: 1.4;
}

.wechat-popup-label {
  font-size: 13px;
  color: #2563EB;
  font-weight: 500;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .float-service {
    right: 12px;
    bottom: 18%;
    gap: 8px;
  }

  .float-service-item {
    width: 42px;
    height: 42px;
  }

  .float-service-item svg {
    width: 18px;
    height: 18px;
  }

  .float-service-label {
    font-size: 12px;
    padding: 4px 10px;
  }

  .wechat-popup {
    right: 48px;
    padding: 10px;
  }

  .wechat-qr-placeholder {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 360px) {
  .float-service {
    right: 8px;
    bottom: 14%;
    gap: 6px;
  }

  .float-service-item {
    width: 38px;
    height: 38px;
  }

  .float-service-item svg {
    width: 16px;
    height: 16px;
  }

  .wechat-popup {
    right: 44px;
  }

  .wechat-qr-placeholder {
    width: 80px;
    height: 80px;
  }
}