/* 浮动工具栏样式 */
.float-toolbar {
    position: fixed;
    right: 30px;
    bottom: 10%;
    z-index: 999;
}

.toolbar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toolbar-item {
    position: relative;
    width: 56px;
    height: 56px;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.toolbar-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #B38B59, #8B6B3D);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 0;
    border-radius: 0;
}

.toolbar-item:hover::before {
    opacity: 1;
}

.toolbar-item i {
    font-size: 24px;
    color: #666;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.toolbar-item:hover i {
    color: #fff;
    transform: scale(1.1);
}

/* 弹窗内图标不受按钮悬停白色影响 */
.toolbar-item:hover .popup-header i,
.toolbar-item:hover .toolbar-popup i {
    color: inherit;
    transform: none;
}

/* 微信按钮特殊颜色 */
#wechatBtn > i {
    color: #07C160;
}

#wechatBtn:hover > i {
    color: #fff;
}

/* 弹出层样式 */
.toolbar-popup {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border-radius: 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 10000;
    min-width: 200px;
}

.toolbar-popup::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 8px solid #fff;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.toolbar-item:hover .toolbar-popup {
    opacity: 1;
    visibility: visible;
    right: 76px;
    pointer-events: auto;
}

/* 弹出层头部 */
.popup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.popup-header i {
    font-size: 18px;
    font-style: normal;
    display: inline-block;
    line-height: 1;
}

.phone-popup .popup-header i,
#phoneBtn:hover .phone-popup .popup-header i {
    color: #09664a !important;
}

.wechat-popup .popup-header i,
#wechatBtn:hover .wechat-popup .popup-header i {
    color: #07C160 !important;
}

/* 弹出层内容 */
.popup-body {
    padding: 15px 20px;
}

/* 电话弹出层 */
.popup-phone-item {
    display: block;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 0;
    margin-bottom: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.popup-phone-item:last-child {
    margin-bottom: 0;
}

.popup-phone-item:hover {
    background: #f0f7f2;
}

.popup-phone-item label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.popup-phone-item .phone-num {
    font-size: 18px;
    font-weight: 600;
    color: #09664a;
}

.popup-phone-item:hover .phone-num {
    color: #084237;
}

/* 微信弹出层 */
.popup-qrcode {
    text-align: center;
}

.popup-qrcode img {
    width: 150px;
    height: 150px;
    border-radius: 0;
    border: 1px solid #eee;
    margin-bottom: 10px;
    padding: 8px;
    background: #fff;
}

.popup-qrcode p {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* 返回顶部按钮 */
#backToTop {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

#backToTop i {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* 返回顶部提示标签 */
#backToTop .toolbar-label {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    color: #333;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

#backToTop .toolbar-label::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 8px solid #fff;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

#backToTop:hover .toolbar-label {
    opacity: 1;
    visibility: visible;
    right: 76px;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .float-toolbar {
        right: 15px;
        bottom: 80px;
    }

    .toolbar-list {
        gap: 10px;
    }

    .toolbar-item {
        width: 48px;
        height: 48px;
        border-radius: 0;
    }

    .toolbar-item i {
        font-size: 22px;
    }

    .toolbar-popup {
        right: 60px;
        min-width: 180px;
    }

    .toolbar-item:hover .toolbar-popup {
        right: 66px;
    }

    .popup-qrcode img {
        width: 120px;
        height: 120px;
    }

    .popup-phone-item .phone-num {
        font-size: 16px;
    }

    #backToTop .toolbar-label {
        display: none;
    }
}
