.nav {
    display: flex;
    width: 100%;
    height: 100%;
    padding-bottom: var(--safe-area-inset-bottom);
    gap: 6px;
    box-sizing: border-box;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-around;
    background: color-mix(in oklab, var(--colorNeutralBackground4), transparent 10%);
    backdrop-filter: blur(10px);
}

.nav-item {
    display: flex;
    width: 60px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6px 8px;
    transition: background-color 0.2s ease-in-out;
    border-radius: 6px;
    text-align: center;
    color: color-mix(in oklab, var(--colorNeutralForeground1), transparent 60%);
    -webkit-tap-highlight-color: transparent;
}

.nav-item:hover .navLabel,
.nav-item:hover svg {
    color: var(--colorNeutralForeground1);
}

.nav-label {
    max-height: 20px;
    margin-top: 4px;
    font-size: 13px !important;
    line-height: 1.2 !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.2s ease-in-out;
    opacity: 0.6;
}

.nav-item:hover .nav-label {
    opacity: 1;
}

.nav-tail {
    display: none;
}

.active {
    .nav-label {
        color: var(--colorBrandForeground1) !important;
    }

    .nav-icon {
        color: var(--colorBrandForeground1) !important;
    }
}

@media (min-width: 768px) {
    .nav {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding-top: calc(10px + var(--safe-area-inset-top));
        background: transparent;
        backdrop-filter: none;
    }

    .nav-label {
        font-size: 11px !important;
        line-height: 1.2 !important;
    }

    .nav-item {
        flex: none;
        width: auto;
        margin: 0 6px;
        height: 46px;
    }

    .nav-item:hover {
        background-color: color-mix(in srgb, var(--colorNeutralForeground1) 8%, transparent);
    }

    .active {
        background-color: color-mix(in srgb, var(--colorBrandBackgroundInverted) 12%, transparent) !important;

        .nav-label {
            max-height: 0;
            margin: 0;
        }
    }

    @media(prefers-color-scheme: light) {
        .active {
            background-color: var(--colorBrandBackgroundInverted) !important
        }
    }

    .nav-tail {
        display: flex;
        position: absolute;
        left: 8px;
        height: 22px;
        width: 4px;
        margin-top: 18px;
        border-radius: 2px;
        background-color: var(--colorBrandForeground1);
        transition: top 0.15s ease-out, height 0.15s ease-out;
        pointer-events: none;
    }
}