/* H5 底部导航（对齐小程序 custom-tab-bar，并加大底部安全区） */
:root {
    --h5-tab-content-height: 56px;
    --h5-tab-safe-min: 14px;
    --h5-tab-icon: 22px;
    --h5-tab-font: 12px;
    --h5-tab-color: #999999;
    --h5-tab-active: #2c80ff;
}

body.has-h5-tab-bar {
    padding-bottom: calc(var(--h5-tab-content-height) + var(--h5-tab-safe-min));
    padding-bottom: calc(var(--h5-tab-content-height) + max(constant(safe-area-inset-bottom), var(--h5-tab-safe-min)));
    padding-bottom: calc(var(--h5-tab-content-height) + max(env(safe-area-inset-bottom), var(--h5-tab-safe-min)));
    box-sizing: border-box;
}

.h5-tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: row;
    background: #ffffff;
    box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.06);
    z-index: 10000;
    box-sizing: border-box;
    padding-bottom: var(--h5-tab-safe-min);
    padding-bottom: max(constant(safe-area-inset-bottom), var(--h5-tab-safe-min));
    padding-bottom: max(env(safe-area-inset-bottom), var(--h5-tab-safe-min));
}

.h5-tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: var(--h5-tab-content-height);
    padding-top: 6px;
    box-sizing: border-box;
}

.h5-tab-icon {
    width: var(--h5-tab-icon);
    height: var(--h5-tab-icon);
    display: block;
    flex-shrink: 0;
}

.h5-tab-text {
    font-size: var(--h5-tab-font);
    color: var(--h5-tab-color);
    margin-top: 3px;
    line-height: 1.2;
    flex-shrink: 0;
}

.h5-tab-text.active {
    color: var(--h5-tab-active);
    font-weight: 600;
}

.h5-tab-spacer {
    height: calc(var(--h5-tab-content-height) + var(--h5-tab-safe-min));
    height: calc(var(--h5-tab-content-height) + max(constant(safe-area-inset-bottom), var(--h5-tab-safe-min)));
    height: calc(var(--h5-tab-content-height) + max(env(safe-area-inset-bottom), var(--h5-tab-safe-min)));
    flex-shrink: 0;
}

.h5-toast {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10001;
    pointer-events: none;
    display: none;
}
