@charset "utf-8";
/* ========================================
   悬浮工具栏 - 完全重构版
   桌面端悬停显示，移动端/平板端点击显示
   2025 Clean Design
======================================== */

/* ===== 基础容器 ===== */
.floating-toolbar {
  position: fixed;
  right: 20px;
  bottom: 120px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toolbar-item {
  position: relative;
}

/* ===== 按钮样式 ===== */
.toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--color-primary, #EF3B1B);
  color: #fff;
  border-radius: var(--border-radius-md, 10px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

.toolbar-btn:hover {
  background: var(--color-primary-hover, #d63516);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  color: #fff;
}

.toolbar-btn svg {
  width: 22px;
  height: 22px;
}

/* ===== 弹窗基础样式 ===== */
.toolbar-popup {
  position: absolute;
  right: 60px;
  bottom: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 30px rgba(0,0,0,0.2);
  padding: 15px;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 99999;
}

/* 弹窗三角箭头 */
.toolbar-popup::after {
  content: '';
  position: absolute;
  right: -8px;
  bottom: 15px;
  border: 8px solid transparent;
  border-left-color: #fff;
}

/* ===== 弹窗内容样式 ===== */
.popup-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* 电话列表 */
.popup-phone-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.popup-phone-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.popup-phone-item:hover {
  background: #fff0ee;
}

.phone-name {
  font-size: 13px;
  color: #666;
}

.phone-number {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary, #EF3B1B);
}

.popup-phone-item:hover .phone-number {
  color: var(--color-primary-hover, #d63516);
}

/* 二维码网格 */
.popup-qrcode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.popup-qrcode-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.popup-qrcode-item img {
  width: 100px;
  height: 100px;
  border-radius: 6px;
  border: 1px solid #eee;
  margin-bottom: 6px;
  transition: transform 0.2s ease;
  object-fit: cover;
}

.popup-qrcode-item:hover img {
  transform: scale(1.05);
}

.popup-qrcode-item span {
  font-size: 12px;
  color: #666;
}

/* 微信弹窗宽度 */
#wechatPopup {
  min-width: 280px;
}

/* ===== 返回顶部 - 默认隐藏 ===== */
.toolbar-backtop {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.toolbar-backtop.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ========================================
   桌面端 (>1024px) - 悬停显示
======================================== */
@media (min-width: 1025px) {
  .toolbar-item:hover .toolbar-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
  }
}

/* ========================================
   移动端/平板端 (≤1024px) - 点击显示
======================================== */
@media (max-width: 1024px) {
  .floating-toolbar {
    right: 15px;
    bottom: 80px;
    gap: 8px;
  }

  .toolbar-btn {
    width: 44px;
    height: 44px;
  }

  .toolbar-btn svg {
    width: 20px;
    height: 20px;
  }

  /* 弹窗定位调整 */
  .toolbar-popup {
    position: fixed;
    right: 70px;
    bottom: 80px;
    left: auto;
    top: auto;
    max-width: 85vw;
  }

  .toolbar-popup::after {
    bottom: 20px;
  }

  /* 点击显示状态 */
  .toolbar-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
  }
}

/* ===== 小屏手机 (<576px) ===== */
@media (max-width: 575.98px) {
  .floating-toolbar {
    right: 10px;
    bottom: 70px;
  }

  .toolbar-btn {
    width: 40px;
    height: 40px;
  }

  .toolbar-btn svg {
    width: 18px;
    height: 18px;
  }

  .toolbar-popup {
    right: 55px;
    bottom: 70px;
    padding: 12px;
    min-width: 200px;
  }

  #wechatPopup {
    min-width: 240px;
  }

  .popup-qrcode-item img {
    width: 85px;
    height: 85px;
  }

  .popup-phone-item {
    padding: 8px 10px;
  }
}

/* ========================================
   Toast 提示样式
======================================== */
.toolbar-toast {
  position: fixed;
  bottom: 150px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100000;
  white-space: nowrap;
}

.toolbar-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ========================================
   移动端二维码点击复制提示
======================================== */
@media (max-width: 1024px) {
  .popup-qrcode-item {
    cursor: pointer;
  }

  .popup-qrcode-item::after {
    content: '点击复制微信号';
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
  }

  .popup-qrcode-item:active {
    opacity: 0.7;
  }
}
