/* One bottom navigation for classic, themed, and corporate tenant pages. */
:root body .m-tabbar a:is(.on, [aria-current="page"]) {
    color: #075bb1;
    background: #dce9f8;
    font-weight: 800;
}

:root[data-color-theme="dark"] body .m-tabbar a:is(.on, [aria-current="page"]) {
    color: #eaf4ff;
    background: #315376;
}

@media (max-width: 1024px) {
    :root body {
        padding-bottom: calc(100px + env(safe-area-inset-bottom));
    }

    :root body .m-tabbar {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 70;
        display: flex;
        align-items: stretch;
        direction: rtl;
        gap: 3px;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 8px max(6px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        border: 1px solid #d6e1ed;
        border-bottom: 0;
        border-radius: 19px 19px 0 0;
        background: linear-gradient(110deg, #f7faff, #eaf3fe);
        box-shadow: 0 -6px 28px rgba(35, 66, 105, .11);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    :root body .m-tabbar::-webkit-scrollbar { display: none; }

    :root body .m-tabbar a {
        flex: 1 0 max(60px, calc((100% - 24px) / min(var(--tab-count), 5)));
        min-width: 0;
        min-height: 74px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 7px 5px;
        scroll-snap-align: start;
        border-radius: 18px;
        color: #34455f;
        background: transparent;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.3;
        text-align: center;
        text-decoration: none;
    }

    :root body .m-tabbar a .ic {
        width: 28px;
        height: 28px;
        flex: none;
        stroke-width: 1.9;
    }

    :root body .m-tabbar a span {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    :root body .m-tabbar a:is(.on, [aria-current="page"]) .ic { stroke-width: 2.1; }
    :root body .m-tabbar a:focus-visible { outline: 2px solid #075bb1; outline-offset: -3px; }

    :root[data-color-theme="dark"] body .m-tabbar {
        border-color: #35475b;
        background: linear-gradient(110deg, #1c2b3d, #172636);
    }
    :root[data-color-theme="dark"] body .m-tabbar a { color: #cbd8e8; }
}
