/* ==== tabbar 安全区修复 v20261105b ==== */

/* 1. 禁止系统字体缩放把 tabbar 撑变形 */
html {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

/* 2. tabbar 底部安全区（iPhone Home 条 / 安卓手势条）+ 浏览器底部工具栏补偿 */
.uni-tabbar-bottom .uni-tabbar {
    padding-bottom: constant(safe-area-inset-bottom) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    height: calc(50px + constant(safe-area-inset-bottom)) !important;
    height: calc(50px + env(safe-area-inset-bottom)) !important;
    box-sizing: content-box !important;
    bottom: var(--tk-toolbar-h, 0px) !important;
    transition: bottom .15s ease-out !important;
}

/* 2b. 兜底：即使 env() 为 0，也保留少量底部留白，防止贴边被切 */
.uni-tabbar__item {
    min-height: 50px !important;
    padding-bottom: max(0px, 2px) !important;
    justify-content: center !important;
}

.uni-tabbar__bd {
    justify-content: center !important;
    height: 100% !important;
}

/* 3. 页面底部占位同步，避免内容被 tabbar 遮住 */
.uni-tabbar ~ .uni-placeholder,
uni-tabbar + .uni-placeholder {
    margin-bottom: 0 !important;
    height: calc(50px + constant(safe-area-inset-bottom) + var(--tk-toolbar-h, 0px)) !important;
    height: calc(50px + env(safe-area-inset-bottom) + var(--tk-toolbar-h, 0px)) !important;
}

/* 4. 图标尺寸与间距微调，保证 5 个 tab 在任何宽度下都完整 */
.uni-tabbar__icon {
    margin-top: 0 !important;
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
}

.uni-tabbar__icon img,
.uni-tabbar__iconfont {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
}

.uni-tabbar__label {
    font-size: 10px !important;
    line-height: 16px !important;
    height: 16px !important;
    margin-top: 2px !important;
    white-space: nowrap !important;
    overflow: visible !important;
}

/* 5. 防止 tabbar 被页面内浮层盖住 */
.uni-tabbar {
    z-index: 9999 !important;
}
