/* BBA Utility Bar — layout + mobile burger behavior.
   Typography comes from the theme wiring (Menu Level Two global).
   Fixed/static positioning is controlled per device from the widget. */
.bba-utility-links,
.bba-utility-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.bba-utility-links[data-desktop="fixed"],
.bba-utility-wrap[data-desktop] .bba-utility-links {
    left: 0;
    right: 0;
}
[data-desktop="fixed"].bba-utility-links {
    position: fixed;
    bottom: 0;
    z-index: 8;
    padding: 0 8vw;
    inset-inline: 0;
    margin-inline: auto;
}
[data-desktop="static"].bba-utility-links {
    position: static;
    padding: 0 8vw;
}
.bba-utility-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex: 0 1 auto; /* do NOT flex-grow: width + alignment controls must win */
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 100%;
}
.bba-utility-links a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.bba-utility-links a svg {
    fill: currentColor;
}
/* When the widget renders inside the theme's footer slot, the slot owns
   positioning — the bar stays in flow within it. */
.utility .bba-utility-links {
    position: static !important;
    left: auto !important;
    right: auto !important;
    width: 100%;
    padding: 0 8vw;
}

/* Burger toggle (mobile only, only rendered in burger mode). */
.bba-utility-burger {
    display: none;
    border: 0;
    background: none;
    cursor: pointer;
    padding: 10px 12px;
}
.bba-utility-burger svg {
    display: block;
}
.bba-utility-burger svg line {
    stroke: var(--e-global-color-primary, #1d1d1b);
    stroke-width: 2;
}

@media (max-width: 800px) {
    [data-mobile="fixed"].bba-utility-links {
        position: fixed;
        bottom: 0;
        z-index: 8;
        padding: 0 16px;
    }
    [data-mobile="static"].bba-utility-links {
        position: static;
        padding: 0 16px;
    }
    /* Burger mode: the wrap is the bar; links collapse behind the toggle. */
    .bba-utility-wrap[data-mobile="burger"] {
        position: relative;
        min-height: 45px;
        padding: 0 16px;
        justify-content: flex-end;
    }
    .bba-utility-wrap[data-mobile="burger"] .bba-utility-burger {
        display: inline-flex;
    }
    .bba-utility-wrap[data-mobile="burger"] .bba-utility-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 20;
        flex-direction: column;
        align-items: stretch;
        padding: 10px 16px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    }
    .bba-utility-wrap[data-mobile="burger"] .bba-utility-links.is-open {
        display: flex;
    }
    .bba-utility-wrap[data-mobile="burger"] .bba-utility-links ul {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .bba-utility-wrap[data-mobile="burger"] .bba-utility-links a {
        justify-content: space-between;
    }
}

/* Drawer-append mode: utility links become part of the main side menu,
   pixel-identical to its top-level items (no indent, same size/weight/color). */
@media (min-width: 801px) {
    .bba-utility-links[data-mobile="drawer"] { position: static; }
}
@media (max-width: 800px) {
    nav[data-mobile="drawer"]:not(.bba-utility-in-drawer) { position: static; padding: 0 16px; }
    .bba-menu.is-drawer .bba-utility-links.bba-utility-in-drawer,
    .bba-menu.is-drawer .bba-utility-links.bba-utility-in-drawer ul,
    .bba-menu.is-drawer .bba-utility-links.bba-utility-in-drawer li {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        border: 0;
        background: none;
        box-shadow: none;
        min-height: 0;
        position: static;
    }
    .bba-menu.is-drawer .bba-utility-links.bba-utility-in-drawer {
        display: flex;
        flex-direction: column;
        margin-top: 24px !important;
        padding-top: 24px !important;
        border-top: 1px solid var(--e-global-color-light_gray, #cccccc);
        font-size: var(--e-global-typography-bba-menu-font-size, 16px);
    }
    .bba-menu.is-drawer .bba-utility-links.bba-utility-in-drawer ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 12px;
        flex: 0 0 auto;
    }
    .bba-menu.is-drawer .bba-utility-links.bba-utility-in-drawer a {
        justify-content: flex-start;
        font-family: var(--e-global-typography-bba-menu-font-family, "DM Sans"), Arial, Helvetica, sans-serif;
        font-weight: var(--e-global-typography-bba-menu-font-weight, 500);
        font-size: 1em;
        line-height: var(--e-global-typography-bba-menu-line-height, 1);
        letter-spacing: var(--e-global-typography-bba-menu-letter-spacing, 3px);
        text-transform: var(--e-global-typography-bba-menu-text-transform, uppercase);
        color: var(--e-global-color-primary, #1d1d1b);
        text-decoration: none;
        transition: opacity 0.3s ease;
    }
    .bba-menu.is-drawer .bba-utility-links.bba-utility-in-drawer a:hover {
        opacity: 0.55;
        text-decoration: none;
    }
}
