/* 微信二维码悬停弹出效果 */

/* 为按钮添加相对定位，但不改变其他样式 */
.advisory-qrcode-trigger {
    position: relative;
    /* 不修改原有的任何样式，只添加相对定位作为弹出层的参照 */
}

/* 二维码弹出层容器 */
.advisory-qrcode-trigger .qrcode-popup {
    position: absolute;
    bottom: calc(100% + 15px); /* 在按钮完整高度上方15px处显示，包含三角箭头的空间 */
    left: 50%;
    transform: translateX(-50%) translateY(15px); /* 初始状态向下偏移15px */
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 9999;
    min-width: 180px;
    text-align: center;
    white-space: nowrap; /* 防止影响按钮布局 */
    display: block;
}

/* 悬停时显示弹出层 */
.advisory-qrcode-trigger:hover .qrcode-popup {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* 二维码图片样式 */
.qrcode-popup img {
    display: block;
    width: 150px;
    height: 150px;
    margin: 0 auto 12px;
    border-radius: 8px;
    border: 2px solid #f0f0f0;
    object-fit: cover;
}

/* 底部提示文字 */
.qrcode-popup-text {
    display: block;
    font-size: 13px;
    color: #666;
    font-weight: 500;
    line-height: 1.5;
}

/* 弹出层三角箭头 */
.qrcode-popup-arrow {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* 不修改按钮本身的悬停效果，保持原有 common_style.css 中的样式 */

/* 响应式适配 */
@media (max-width: 768px) {
    .qrcode-popup {
        bottom: calc(100% + 10px);
        min-width: 160px;
        padding: 12px;
    }
    
    .qrcode-popup img {
        width: 130px;
        height: 130px;
    }
    
    .qrcode-popup-text {
        font-size: 12px;
    }
}

/* 动画效果增强 */
@keyframes qrcodeSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.advisory-qrcode-trigger:hover .qrcode-popup {
    animation: qrcodeSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 添加淡入光晕效果 */
.qrcode-popup::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(230, 15, 15, 0.05), rgba(255, 91, 1, 0.05));
    border-radius: 12px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.advisory-qrcode-trigger:hover .qrcode-popup::before {
    opacity: 1;
}
