/* UBICHEE mobile bottom navigation. Markup: mu-plugins/ubi-bottom-nav.php.
   One fixed bar, five equal tabs, safe-area aware, and hidden from 769px up
   where the header navigation takes over. */

.ubi-bottom-nav{
    position:fixed;
    inset:auto 0 0;
    z-index:900;
    display:none;
    padding:6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    background:rgba(255,255,255,.94);
    border-top:1px solid rgba(107,76,154,.14);
    box-shadow:0 -6px 24px rgba(53,22,95,.08);
    -webkit-backdrop-filter:blur(12px);
    backdrop-filter:blur(12px);
}

.ubi-bottom-nav__item{
    flex:1 1 0;
    min-width:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    min-height:48px;
    padding:4px 2px;
    border-radius:12px;
    color:var(--ubi-muted, #6B5F7A);
    font-family:inherit;
    font-size:10.5px;
    font-weight:600;
    line-height:1.15;
    letter-spacing:.01em;
    text-align:center;
    text-decoration:none;
    -webkit-tap-highlight-color:transparent;
    transition:color .18s ease;
}

.ubi-bottom-nav__icon{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    width:42px;
    height:26px;
    border-radius:999px;
    transition:background-color .18s ease, transform .12s ease;
}

.ubi-bottom-nav__icon svg{
    display:block;
    width:22px;
    height:22px;
}

.ubi-bottom-nav__label{
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.ubi-bottom-nav__item.is-active{
    color:var(--ubi-purple, #6B4C9A);
    font-weight:700;
}

.ubi-bottom-nav__item.is-active .ubi-bottom-nav__icon{
    background:var(--ubi-purple-light, #E8DFF5);
}

.ubi-bottom-nav__item:active .ubi-bottom-nav__icon{
    transform:scale(.94);
}

.ubi-bottom-nav__item:focus-visible{
    outline:2px solid var(--ubi-purple, #6B4C9A);
    outline-offset:2px;
}

.ubi-bottom-nav__badge{
    position:absolute;
    top:-4px;
    right:1px;
    min-width:16px;
    height:16px;
    padding:0 4px;
    border-radius:999px;
    background:var(--ubi-purple, #6B4C9A);
    color:#fff;
    font:700 9.5px/16px 'DM Sans', sans-serif;
    text-align:center;
    box-shadow:0 0 0 2px rgba(255,255,255,.94);
}

.ubi-bottom-nav__badge[hidden]{
    display:none;
}

@media (hover:hover){
    .ubi-bottom-nav__item:hover{
        color:var(--ubi-purple, #6B4C9A);
    }
}

@media (max-width:768px){
    .ubi-bottom-nav{
        display:flex;
        justify-content:space-between;
        gap:2px;
    }

    /* Keep the last footer line clear of the fixed bar. */
    .ubi-has-bottom-nav{
        padding-bottom:calc(68px + env(safe-area-inset-bottom, 0px));
    }

    html{
        scroll-padding-bottom:calc(68px + env(safe-area-inset-bottom, 0px));
    }

    /* The add-to-cart toast would otherwise land behind the bar. */
    .cart-toast{
        left:12px;
        right:12px;
        bottom:calc(78px + env(safe-area-inset-bottom, 0px));
    }
}

@media (prefers-reduced-motion:reduce){
    .ubi-bottom-nav__item,
    .ubi-bottom-nav__icon{
        transition:none;
    }
}

@media print{
    .ubi-bottom-nav{
        display:none !important;
    }
}
