/* ============================================
   悬浮工具栏样式 - 通用组件
   文件名: css/float-toolbar.css
   作用: 详情页右侧悬浮工具栏（打印、分享、返回顶部）
   ============================================ */

/* 悬浮工具栏 */
.float-toolbar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.tool-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: #666;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.tool-btn:hover {
    background: #fff;
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.tool-btn:hover svg {
    color: #333;
}

.tool-btn:active {
    transform: scale(1.02);
}

.tool-btn.back-to-top {
    background: rgba(200, 68, 50, 0.9);
    color: #fff;
}

.tool-btn.back-to-top:hover {
    background: #c8443e;
    color: #fff;
}

/* 按钮提示 */
.tool-btn::after {
    content: attr(title);
    position: absolute;
    right: 54px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.tool-btn:hover::after {
    opacity: 1;
}

/* 二维码弹窗 */
.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.qr-modal.active {
    display: flex;
}

.qr-content {
    background: #fff;
    border-radius: 16px;
    padding: 32px 40px;
    text-align: center;
    position: relative;
    animation: fadeInUp 0.3s;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.qr-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
    color: #bbb;
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.qr-close:hover {
    color: #666;
    background: #f5f5f5;
}

.qr-content h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 500;
}

.qr-code {
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid #eee;
}

.qr-tip {
    font-size: 13px;
    color: #999;
}

/* 分享成功提示 */
.share-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 3000;
    animation: fadeInUp 0.3s;
}

/* 响应式 */
@media (max-width: 768px) {
    .float-toolbar {
        right: 12px;
        gap: 8px;
    }
    .tool-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        border-radius: 10px;
    }
    .tool-btn::after {
        display: none;
    }
}

/* 打印时隐藏 */
@media print {
    .float-toolbar,
    .qr-modal,
    .share-toast {
        display: none !important;
    }
}
