/* 共享样式文件 - 所有页面共享的样式 */

/* 引入图标库 */
@import url('https://cdn.layui.com/layui/v2/css/layui.css');
@import url('//at.alicdn.com/t/c/font_4492313_45m27z4p8nv.css'); /* iconfont图标库 */

/* 悬浮导航栏样式 */
body .base-nav-box {
    position: fixed !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 1000 !important;
    background-color: transparent !important;
    border-radius: 10px !important;
    padding: 5px !important;
}

#nav-btn-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-btn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    text-decoration: none;
    color: #333;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    background-color: #f0f0f0;
}

.nav-btn-item:hover {
    background-color: rgba(240, 240, 240, 0.8);
    color: #ff7200;
}

.nav-btn-item-choosed {
    background-color: rgba(255, 245, 238, 0.8);
    color: #ff7200;
}

.nav-btn-item i {
    font-size: 18px;
    margin-bottom: 2px;
    margin-top: 3px;
}

.nav-btn-item svg {
    /* 适当调整图标尺寸 */
    width: 32px !important;
    height: 32px !important;
    /* 确保没有其他样式影响 */
    max-width: none !important;
    max-height: none !important;
    /* 调整边距 */
    margin: 0 auto 3px auto !important;
    /* 确保图标可见 */
    opacity: 1 !important;
    display: block !important;
    /* 确保变换不影响大小 */
    transform: none !important;
    /* 确保图标颜色正确 */
    fill: currentColor !important;
    color: inherit !important;
    /* 添加调试边框查看位置 */
    /* border: 1px solid red; */
    /* 确保图标在最上层 */
    z-index: 1 !important;
}

/* 移除br标签的影响 */
.nav-btn-item br {
    display: none !important;
}

/* 调整按钮尺寸以适应图标 */
.nav-btn-item {
    width: 55px !important;
    height: 60px !important;
    /* 调整内边距 */
    padding: 5px !important;
    /* 确保内容居中 */
    justify-content: center !important;
    align-items: center !important;
    gap: 2px !important;
    /* 确保内容不被裁剪 */
    overflow: visible !important;
}

/* 确保文本在图标下方居中 */
.nav-btn-item span {
    font-size: 12px !important;
    margin-top: 2px !important;
    /* 确保文本在图标下方 */
    display: block !important;
    text-align: center !important;
}

/* 响应式设计 */
@media (max-width: 1600px) {
    .base-nav-box {
        top: 120px;
    }
}

@media (max-width: 1400px) {
    .base-nav-box {
        right: 15px;
        top: 100px;
    }
}

@media (max-width: 1200px) {
    .base-nav-box {
        right: 10px;
        top: 90px;
        padding: 5px;
    }
    
    .nav-btn-item {
        width: 50px !important;
        height: 55px !important;
    }
    
    .nav-btn-item svg {
        width: 28px !important;
        height: 28px !important;
    }
    
    .nav-btn-item i {
        font-size: 16px;
    }
}

@media (max-width: 992px) {
    .base-nav-box {
        right: 5px;
        top: 80px;
        padding: 4px;
    }
    
    .nav-btn-item {
        width: 48px !important;
        height: 53px !important;
    }
    
    .nav-btn-item svg {
        width: 26px !important;
        height: 26px !important;
    }
    
    .nav-btn-item i {
        font-size: 15px;
    }
    
    #nav-btn-box {
        gap: 7px;
    }
}

@media (max-width: 768px) {
    .base-nav-box {
        position: fixed;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        width: auto;
        padding: 5px;
    }
    
    #nav-btn-box {
        flex-direction: column;
        gap: 6px;
    }
    
    .nav-btn-item {
        width: 45px !important;
        height: 50px !important;
    }
    
    .nav-btn-item svg {
        width: 24px !important;
        height: 24px !important;
    }
}

@media (max-width: 576px) {
    .base-nav-box {
        right: 5px;
        padding: 4px;
        margin: 0;
    }
    
    #nav-btn-box {
        gap: 5px;
    }
    
    .nav-btn-item {
        width: 42px !important;
        height: 47px !important;
        font-size: 10px;
    }
    
    .nav-btn-item svg {
        width: 22px !important;
        height: 22px !important;
    }
    
    .nav-btn-item i {
        font-size: 13px;
    }
}