/* 悬浮微信二维码 */
.floating-cta {
  align-items: flex-end;
}

.floating-qr {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.floating-qr-panel {
  position: relative;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 14px;
  padding: 12px 12px 10px;
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.12), 0 4px 16px rgba(15, 23, 42, 0.08);
  text-align: center;
  display: none;
  overflow: visible;
}

.floating-qr-close {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  color: #64748b;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.floating-qr-close:hover {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}

.floating-qr-img {
  width: 132px;
  height: 132px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.floating-qr-label {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.02em;
}

.floating-btn-qr {
  display: flex;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

.floating-btn-qr svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

/* 展开：显示二维码，隐藏图标按钮（桌面） */
.floating-qr.is-panel-open .floating-qr-panel {
  display: block;
}

.floating-qr.is-panel-open .floating-btn-qr {
  display: none;
}

/* 桌面：默认展开二维码 */
@media (min-width: 769px) {
  .floating-qr.is-panel-open .floating-qr-panel {
    animation: floating-qr-in 0.22s ease;
  }
}

/* 手机：默认只显示图标，面板浮在按钮上方 */
@media (max-width: 768px) {
  .floating-qr.is-panel-open .floating-qr-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    min-width: 156px;
    animation: floating-qr-in 0.22s ease;
  }

  .floating-qr.is-panel-open .floating-btn-qr {
    display: flex;
  }
}

@keyframes floating-qr-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

html[data-theme="glass"] .floating-qr-panel {
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(255, 255, 255, 0.55);
}

html[data-theme="saas"] .floating-qr-panel {
  background: rgba(17, 17, 24, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

html[data-theme="saas"] .floating-qr-label {
  color: #8b8b9e;
}

html[data-theme="saas"] .floating-qr-close {
  background: rgba(255, 255, 255, 0.08);
  color: #8b8b9e;
}

html[data-theme="saas"] .floating-qr-close:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}
