/* 右侧悬浮栏（可配置多入口） */
.float-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.float-sidebar-item {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
}

.float-sidebar-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 44px;
    padding: 14px 8px;
    border: none;
    border-radius: 8px 0 0 8px;
    background: var(--gradient-primary, linear-gradient(135deg, #1a4d8f 0%, #0d2e5c 100%));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 2px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    box-shadow: var(--shadow-md, 0 4px 16px rgba(26, 77, 143, 0.12));
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.float-sidebar-tab i {
    writing-mode: horizontal-tb;
    font-size: 16px;
}

.float-sidebar-tab:hover,
.float-sidebar-item.is-open .float-sidebar-tab {
    background: var(--primary-light, #2563a8);
    box-shadow: var(--shadow-lg, 0 8px 32px rgba(26, 77, 143, 0.16));
}

.float-sidebar-panel {
    width: 0;
    opacity: 0;
    overflow: hidden;
    margin-right: 0;
    background: #fff;
    border-radius: 12px 0 0 12px;
    box-shadow: var(--shadow-lg, 0 8px 32px rgba(26, 77, 143, 0.16));
    transition: width 0.3s ease, opacity 0.3s ease, margin-right 0.3s ease, padding 0.3s ease;
    padding: 0;
    pointer-events: none;
}

.float-sidebar-item.is-open .float-sidebar-panel,
.float-sidebar-item:hover .float-sidebar-panel {
    width: 180px;
    opacity: 1;
    margin-right: 4px;
    padding: 16px;
    pointer-events: auto;
}

.float-sidebar-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-color, #1a4d8f);
    text-align: center;
    margin-bottom: 12px;
}

.float-sidebar-qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
}

.float-sidebar-qrcode img,
.float-sidebar-qrcode canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.float-sidebar-image {
    display: block;
    width: 140px;
    height: auto;
    margin: 0 auto;
}

.float-sidebar-tip {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--text-light, #718096);
    text-align: center;
    line-height: 1.4;
}

@media (max-width: 767.98px) {
    .float-sidebar-item[data-mobile-navigate="true"] .float-sidebar-panel {
        display: none;
    }

    .float-sidebar-item[data-mobile-navigate="true"]:hover .float-sidebar-panel,
    .float-sidebar-item[data-mobile-navigate="true"].is-open .float-sidebar-panel {
        display: none;
        width: 0;
        opacity: 0;
        padding: 0;
        pointer-events: none;
    }

    .float-sidebar-item:not([data-mobile-navigate="true"]):hover .float-sidebar-panel {
        width: 0;
        opacity: 0;
        margin-right: 0;
        padding: 0;
        pointer-events: none;
    }

    .float-sidebar-item:not([data-mobile-navigate="true"]).is-open .float-sidebar-panel {
        width: 160px;
        opacity: 1;
        margin-right: 4px;
        padding: 14px;
        pointer-events: auto;
    }
}
