/* ==========================================================================
   Mobile Bottom Navigation (FleetCart inspired)
   Usage: linked in public.layouts.app, rendered in public.layouts.bottom-navigation
   ========================================================================== */

.bottom-navigation-wrap {
    display: none;
}

@media screen and (max-width: 991px) {
    .bottom-navigation-wrap {
        position: fixed;
        display: block;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100vw;
        background: #ffffff;
        z-index: 90;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-sizing: border-box;
        overflow: hidden;
        -webkit-user-select: none;
        user-select: none;
    }

    body {
        padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    }

    .bottom-navigation-items {
        display: flex;
        align-items: center;
        justify-content: space-around;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        padding: 6px 4px 6px;
        list-style: none;
        box-sizing: border-box;
    }

    .bottom-navigation-items li {
        flex: 1 1 0%;
        min-width: 0;
        text-align: center;
    }

    .bottom-navigation-items li a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 4px 2px;
        position: relative;
        text-decoration: none;
        color: #64748b;
        transition: color 0.15s ease, transform 0.1s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-navigation-items li a:active {
        transform: scale(0.94);
    }

    .bottom-navigation-items li a.active {
        color: var(--color-primary, #0758A2);
    }

    .bottom-navigation-items li a svg {
        width: 22px;
        height: 22px;
        display: block;
        transition: stroke 0.15s ease, fill 0.15s ease;
    }

    /* Stroke SVGs (inactive state) */
    .bottom-navigation-items li a .svg-stroke-color path,
    .bottom-navigation-items li a .svg-stroke-color circle,
    .bottom-navigation-items li a .svg-stroke-color rect {
        stroke: #64748b;
        transition: stroke 0.15s ease;
    }

    /* Stroke SVGs (active state) */
    .bottom-navigation-items li a.active .svg-stroke-color path,
    .bottom-navigation-items li a.active .svg-stroke-color circle,
    .bottom-navigation-items li a.active .svg-stroke-color rect {
        stroke: var(--color-primary, #0758A2);
    }

    /* Fill SVGs (active state) */
    .bottom-navigation-items li a.active svg path[fill="#292D32"],
    .bottom-navigation-items li a.active svg path[fill="#000000"] {
        fill: var(--color-primary, #0758A2);
    }

    .bottom-navigation-items li a.active svg:not(.svg-stroke-color) path {
        fill: var(--color-primary, #0758A2);
    }

    .bottom-navigation-items li a .cart-fill-color {
        stroke: var(--color-primary, #0758A2);
    }

    /* Text labels below icons */
    .bottom-navigation-items li a span.bottom-nav-label {
        font-size: 11px;
        font-style: normal;
        font-weight: 500;
        line-height: 1.25;
        text-align: center;
        color: #64748b;
        display: block;
        margin-top: 3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        transition: color 0.15s ease, font-weight 0.15s ease;
    }

    .bottom-navigation-items li a.active span.bottom-nav-label {
        color: var(--color-primary, #0758A2);
        font-weight: 600;
    }

    /* Cart badge */
    .bottom-navigation-items li a .count {
        position: absolute;
        font-size: 10px;
        font-weight: 700;
        line-height: 16px;
        top: 0px;
        right: calc(50% - 15px);
        height: 16px;
        min-width: 16px;
        padding: 0 4px;
        color: #ffffff;
        background: #e23e1d;
        text-align: center;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }
}
