/* ==========================================================
   DEWPOINT MOBILE BOTTOM NAVIGATION
   Component owner: this file only.
   ========================================================== */
:root {
    --dp-mobile-bottom-nav-height: 72px;
    --dp-mobile-sheet-top: 76px;
}

.dp-mobile-bottom-nav {
    display: none;
}

@media (max-width: 767px) {
    html {
        scroll-padding-bottom:
            calc(
                var(--dp-mobile-bottom-nav-height)
                + env(safe-area-inset-bottom)
                + 20px
            );
    }

    body {
        padding-bottom:
            calc(
                var(--dp-mobile-bottom-nav-height)
                + env(safe-area-inset-bottom)
            );
    }

    .dp-mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2147482000;

        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        align-items: stretch;

        height:
            calc(
                var(--dp-mobile-bottom-nav-height)
                + env(safe-area-inset-bottom)
            );

        padding:
            6px
            6px
            env(safe-area-inset-bottom);

        box-sizing: border-box;

        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid rgba(17, 33, 57, 0.10);
        box-shadow: 0 -10px 28px rgba(17, 33, 57, 0.10);

        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .dp-mobile-bottom-nav[hidden] {
        display: none !important;
    }

    .dp-mobile-bottom-nav button {
        appearance: none;
        -webkit-appearance: none;
        border: 0;
        background: transparent;
        color: #61718a;
        border-radius: 14px;
        min-width: 0;
        padding: 5px 2px 4px;
        font: inherit;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;

        line-height: 1;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .dp-mobile-bottom-nav button svg {
        width: 23px;
        height: 23px;
        display: block;
        stroke: currentColor;
        stroke-width: 1.9;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex: 0 0 auto;
    }

    .dp-mobile-bottom-nav button span {
        display: block;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;

        font-size: 10px;
        font-weight: 750;
        letter-spacing: -0.1px;
        text-align: center;
    }

    .dp-mobile-bottom-nav button.is-active {
        color: #112139;
        background: #eef0f2;
    }

    .dp-mobile-bottom-nav button:active {
        transform: translateY(1px);
    }

    .dp-mobile-bottom-nav button:focus-visible {
        outline: 2px solid #112139;
        outline-offset: -2px;
    }
}

@media (min-width: 768px) {
    .dp-mobile-bottom-nav {
        display: none !important;
    }
}
