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

.float-item {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.float-item:hover {
    background: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(230,57,70,0.3);
}

.float-item i {
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.float-item:hover i {
    color: #fff;
}

.float-item span {
    font-size: 0.75rem;
    color: #666;
    margin-top: 5px;
    transition: all 0.3s ease;
}

.float-item:hover span {
    color: #fff;
}

.float-item a {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: inherit;
}

/* 浮动面板 - 电脑端 */
.float-panel {
    position: absolute;
    right: 95px;
    top: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.float-item:hover .float-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.float-panel::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid #fff;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.panel-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.phone-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 10px 0;
}

.work-time {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
}

.qrcode-panel img {
    width: 150px;
    height: 150px;
    display: block;
}

/* 返回顶部 */
#backToTop {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

/* 手机端面板 - 默认隐藏（只在非移动端生效） */
@media (min-width: 769px) {
    .mobile-phone-panel {
        display: none !important;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .float-sidebar {
        right: 10px;
        gap: 8px;
    }
    
    .float-item {
        width: 60px;
        height: 60px;
    }
    
    .float-item i {
        font-size: 1.3rem;
    }
    
    .float-item span {
        font-size: 0.65rem;
    }
    
    /* 电脑端面板在手机端隐藏 */
    .float-panel {
        display: none !important;
    }
    
    /* 手机端面板样式 */
    .mobile-phone-panel {
        display: none;
        position: absolute;
        right: 70px;
        top: 50%;
        transform: translateY(-50%);
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        padding: 15px 20px;
        white-space: nowrap;
        z-index: 1000;
        min-width: 180px;
    }
    
    /* 小三角箭头 */
    .mobile-phone-panel::after {
        content: '';
        position: absolute;
        right: -8px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 8px solid #fff;
        border-top: 8px solid transparent;
        border-bottom: 8px solid transparent;
    }
    
    /* 显示手机端面板 */
    .float-item.active .mobile-phone-panel {
        display: block !important;
    }
    
    .mobile-panel-title {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--secondary-color);
        margin-bottom: 8px;
    }
    
    .mobile-panel-number {
        font-size: 1rem;
        font-weight: 600;
        color: var(--primary-color);
        text-decoration: none;
        display: block;
    }
}
