:root {
    --match-bottom-nav-height: 64px;
}

@media (max-width: 991.98px) {
    body.match-nav-body {
        padding-bottom: calc(
            var(--match-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 10px
        );
    }
}

.match-bottom-nav {
    display: none;
}

@media (max-width: 991.98px) {
    .match-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1060;
        min-height: var(--match-bottom-nav-height);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: #ffffff;
        box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.1);
        display: flex;
        align-items: stretch;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .match-bottom-nav::-webkit-scrollbar {
        display: none;
    }

    .match-bottom-nav a {
        flex: 1 0 auto;
        min-width: 52px;
        max-width: 88px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--match-nav-inactive, #78909c);
        font-size: 0.6rem;
        font-weight: 500;
        gap: 3px;
        padding: 8px 4px;
        position: relative;
        border: none;
        background: transparent;
    }

    .match-bottom-nav a i {
        font-size: 0.95rem;
        margin-bottom: 1px;
    }

    .match-bottom-nav a.active {
        color: var(--match-nav-active, #1565c0);
        font-weight: 700;
    }

    .match-bottom-nav a.active i {
        color: var(--match-nav-active, #1565c0);
    }

    .match-bottom-nav a.active::after {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 28px;
        height: 3px;
        background: var(--match-nav-active, #1565c0);
        border-radius: 0 0 3px 3px;
    }

    .match-bottom-nav--list-only {
        justify-content: center;
    }

    .match-bottom-nav--list-only a {
        flex: 0 1 auto;
        min-width: 72px;
        max-width: 120px;
    }
}

html.match-theme-dark .match-bottom-nav {
    background: var(--match-card);
    box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.35);
}
