﻿/* ==========================================================
   右下角悬浮按钮（全站通用）
   回到顶部（滚动一定距离后显示）+ 微信客服（常驻）
   ========================================================== */

.float-btns {
  position: fixed;
  right: 5px;
  bottom: 60px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* ---------- 回到顶部按钮（白底黑箭头） ---------- */
.back-top {
  width: 35px;
  height: 35px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.3s,
    transform 0.3s,
    visibility 0.3s,
    background 0.2s;
  /* no mobile tap highlight block */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  outline: none;
}

/* press feedback: slight shrink (keep translateY(0) of the shown state) */
.back-top:active {
  transform: translateY(0) scale(0.9);
}

.back-top svg {
  width: 18px;
  height: 18px;
}

.back-top:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(0) scale(1.05);
}

/* 滚动一定距离后显示 */
.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- 微信客服按钮（白底 + 黑色线条图标） ---------- */
.kefu-btn {
  width: 35px;
  height: 35px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #666; /* 黑色线条图标 */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition:
    background 0.2s,
    transform 0.2s;
  /* no mobile tap highlight block */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  outline: none;
}

/* press feedback: slight shrink (transition covers transform) */
.kefu-btn:active {
  transform: scale(0.9);
}

.kefu-btn svg {
  width: 20px;
  height: 20px;
}

.kefu-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.05);
}

/* ---------- 客服弹窗 ---------- */
.kefu-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s,
    visibility 0.25s;
}

.kefu-mask.open {
  opacity: 1;
  visibility: visible;
}

.kefu-dialog {
  width: 320px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border-radius: 12px;
  padding: 24px 20px 20px;
  text-align: center;
  position: relative;
  transform: translateY(16px);
  transition: transform 0.25s;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.kefu-mask.open .kefu-dialog {
  transform: translateY(0);
}

.kefu-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 4px;
}

.kefu-close:hover {
  color: #333;
}

.kefu-title {
  font-size: 17px;
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
}

.kefu-sub {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
}

/* 企业微信占位区：后期替换为企微二维码图片或跳转链接 */
.kefu-placeholder {
  height: 120px;
  border: 1px dashed #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 13px;
  margin-bottom: 14px;
  background: #fafafa;
}

.kefu-tip {
  font-size: 12px;
  color: #aaa;
}

/* ---------- 手机端 ---------- */
@media (max-width: 860px) {
  .float-btns {
    right: 5px;
    bottom: 16px;
  }
}
