/* Floating Contact Toolbar - Static replacement for CMS smartService */
.th-float-toolbar {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.th-float-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
}
.th-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.th-float-btn svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.th-float-btn--email { background: #f5a623; }
.th-float-btn--wechat { background: #07c160; }
.th-float-btn--totop {
  background: #666;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.2s, box-shadow 0.2s;
}
.th-float-btn--totop.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Popup panel */
.th-float-popup {
  position: absolute;
  right: 62px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  padding: 16px;
  min-width: 220px;
  display: none;
  z-index: 100000;
  color: #333;
  font-size: 14px;
  line-height: 1.6;
}
.th-float-popup::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-left-color: #fff;
  border-right: none;
}
.th-float-popup.active { display: block; }

.th-float-popup h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #222;
}
.th-float-popup a {
  color: #1a73e8;
  text-decoration: none;
}
.th-float-popup a:hover {
  text-decoration: underline;
}

.th-float-popup .th-qr-wrap {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.th-float-popup .th-qr-item {
  text-align: center;
}
.th-float-popup .th-qr-item img {
  width: 100px;
  height: 100px;
  border: 1px solid #eee;
  border-radius: 4px;
  display: block;
}
.th-float-popup .th-qr-item p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #666;
}

/* Close button inside popup */
.th-float-popup .th-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 18px;
  color: #999;
  line-height: 20px;
  padding: 0;
}
.th-float-popup .th-close:hover { color: #333; }

/* Mobile adjustments */
@media (max-width: 768px) {
  .th-float-toolbar {
    right: 8px;
    gap: 8px;
  }
  .th-float-btn {
    width: 42px;
    height: 42px;
  }
  .th-float-btn svg {
    width: 20px;
    height: 20px;
  }
  .th-float-popup {
    position: fixed;
    right: 8px;
    left: 8px;
    top: auto;
    bottom: 80px;
    transform: none;
    min-width: auto;
  }
  .th-float-popup::after { display: none; }
}
