/* ============================================================
   WayAcross Bottom Bar
   Visible only on mobile / tablet (< 992px)
   Active/hover green routes through --color-primary (defined by
   the Akira theme's :root, driven by its color customizer); the
   var() fallback keeps every other theme on the literal hex value.
   ============================================================ */

/* ---- Bar container ---------------------------------------- */
#wayacross-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* Bootstrap 5 z-index scale: .fixed-* = 1030, offcanvas-backdrop = 1040,
       offcanvas = 1045, modal-backdrop = 1050, modal/#canvas-mini-cart = 1055.
       The bar sits in the fixed-element tier (1030) so that the
       cart, o modal backdrop e qualquer offcanvas do tema Akira fiquem
       always on top - the bar visually disappears when the customer
       abre o mini-cart. */
    z-index: 1030;

    display: flex;
    align-items: stretch;

    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.10);

    height: 64px;
}

/* ---- Each category item ----------------------------------- */
#wayacross-bottom-bar .wbb-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;

    padding: 6px 4px;
    text-decoration: none !important;
    color: #718096;

    border-top: 3px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;

    -webkit-tap-highlight-color: color-mix(in srgb, var(--color-primary, #009345) 12%, transparent);
}

#wayacross-bottom-bar .wbb-item:hover,
#wayacross-bottom-bar .wbb-item:focus {
    color: var(--color-primary, #009345);
    border-top-color: var(--color-primary, #009345);
    background: color-mix(in srgb, var(--color-primary, #009345) 5%, transparent);
    text-decoration: none !important;
    outline: none;
}

#wayacross-bottom-bar .wbb-item.active {
    color: var(--color-primary, #009345);
    border-top-color: var(--color-primary, #009345);
}

/* ---- Icon ------------------------------------------------- */
#wayacross-bottom-bar .wbb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

#wayacross-bottom-bar .wbb-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

/* ---- Label ----------------------------------------------- */
#wayacross-bottom-bar .wbb-label {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 68px;
}

/* ---- Safe area (iPhone home bar) -------------------------- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    #wayacross-bottom-bar {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(64px + env(safe-area-inset-bottom));
    }
}

/* ---- Body padding so content is not hidden behind bar ----- */
body {
    padding-bottom: 64px !important;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom)) !important;
    }
}

/* ---- Hide on desktop (>= 992px) --------------------------- */
@media (min-width: 992px) {
    #wayacross-bottom-bar {
        display: none !important;
    }

    body {
        padding-bottom: 0 !important;
    }
}
