﻿/* 悬浮窗容器 */
.float-widget {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    cursor: pointer;
}

/* 折叠状态 - 侧边栏标签 */
.widget-tab {
    width: 40px;
    background: #07c160;
    color: white;
    text-align: center;
    padding: 12px 5px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: -2px 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

    .widget-tab:hover {
        background: #06ad56;
        transform: scale(1.02);
    }

/* 微信图标 */
.wechat-icon {
    width: 24px;
    height: 24px;
    display: block;
    margin: 0 auto;
}

.widget-tab span {
    font-size: 12px;
    writing-mode: horizontal-tb;
    display: block;
}

/* 展开状态 - 二维码卡片 */
.widget-content {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 15px;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

    /* 小三角箭头 */
    .widget-content::after {
        content: '';
        position: absolute;
        right: -8px;
        top: 50%;
        transform: translateY(-50%);
        border-width: 8px 0 8px 8px;
        border-style: solid;
        border-color: transparent transparent transparent white;
    }

/* 二维码图片 */
.qr-code {
    width: 150px;
    height: 150px;
    display: block;
    margin-bottom: 8px;
}

.qr-tip {
    text-align: center;
    color: #333;
    font-size: 12px;
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

/* 悬停时展开 */
.float-widget:hover .widget-content {
    display: block;
    opacity: 1;
}

/* 移动端适配：点击展开（手机上 hover 不友好） */
@media (max-width: 768px) {
    .float-widget.active .widget-content {
        display: block;
        opacity: 1;
    }
}
