/* 底部导航：悬浮白色胶囊，与 theme-loader.js 的 .bottom-nav / .nav-item / data-icon 约定一致 */

:root {
    --bottom-nav-height: 72px;
    --bottom-nav-clearance: calc(96px + env(safe-area-inset-bottom, 0px));
}

.bottom-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: var(--bottom-nav-height);
    background: #fff;
    border-radius: 36px;
    border: none;
    padding: 0 8px;
    box-shadow: 0 8px 24px rgba(36, 55, 86, 0.12);
    box-sizing: border-box;
    overflow: hidden;
}

.bottom-nav .nav-item,
.bottom-nav .nav-item:link,
.bottom-nav .nav-item:visited {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 8px 2px 7px;
    text-decoration: none;
    color: #30333a;
    font-size: 12px;
    line-height: 1.15;
    font-weight: 400;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    box-sizing: border-box;
}

.bottom-nav .nav-item:active {
    opacity: 0.82;
}

.bottom-nav .nav-item.active,
.bottom-nav .nav-item.active:link,
.bottom-nav .nav-item.active:visited {
    color: var(--app-accent, #1677ff);
    font-weight: 600;
}

.bottom-nav .nav-icon {
    display: block;
    margin-bottom: 5px;
    line-height: 0;
}

.bottom-nav .nav-icon img {
    width: 22px;
    height: 22px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.bottom-nav .nav-text {
    display: block;
}

@media (max-width: 360px) {
    .bottom-nav {
        left: 12px;
        right: 12px;
        height: 68px;
        border-radius: 34px;
    }
}

/* Cordova 2410DPN6CC：底部 env 常为 0，抬高胶囊导航，避免与系统手势条/主页条重叠 */
html.app-cordova-xiaomi-2410 {
    --app-cordova-bottom-inset: 32px;
    --bottom-nav-clearance: calc(96px + var(--app-cordova-bottom-inset));
}

html.app-cordova-xiaomi-2410 .bottom-nav {
    bottom: calc(12px + var(--app-cordova-bottom-inset));
    padding-bottom: 4px;
    box-sizing: border-box;
}

html.app-cordova-xiaomi-2410 .bottom-nav .nav-item {
    padding-bottom: 10px;
}

html.app-cordova-xiaomi-2410 body.page-mine {
    padding-bottom: calc(58px + var(--app-cordova-bottom-inset)) !important;
}
