:root {
    --bambu-topbar-height: 0px;
}

body.has-bambu-topbar-padding {
    padding-top: var(--bambu-topbar-height);
}

body.has-bambu-topbar-header-offset .site-header.is-sticky,
body.has-bambu-topbar-header-offset .site-header.sticky,
body.has-bambu-topbar-header-offset .sticky-header,
body.has-bambu-topbar-header-offset [data-sticky-header="true"] {
    top: var(--bambu-topbar-height);
}

.bambu-topbar {
    position: relative;
    display: block;
    inline-size: 100%;
    color: var(--bambu-topbar-color, #ffffff);
    background: var(--bambu-topbar-bg, #0d1f26);
    font-family: var(--bambu-topbar-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    font-size: var(--bambu-topbar-fs, 16px);
    font-weight: var(--bambu-topbar-fw, 500);
    line-height: 1.4;
    z-index: var(--bambu-topbar-z, 1002);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    will-change: transform, opacity;
}

.bambu-topbar--sticky {
    position: sticky;
    top: 0;
}

.bambu-topbar--fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.bambu-topbar--static {
    position: relative;
}

.bambu-topbar__inner {
    position: relative;
    margin: 0 auto;
    padding: var(--bambu-topbar-padding, 12px);
    min-height: var(--bambu-topbar-min-height, 48px);
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.bambu-topbar--align-left .bambu-topbar__inner {
    justify-content: flex-start;
    text-align: left;
}

.bambu-topbar--align-right .bambu-topbar__inner {
    justify-content: flex-end;
    text-align: right;
}

.bambu-topbar--width-container .bambu-topbar__inner {
    width: 100%;
}

.bambu-topbar__content {
    flex: 1 1 auto;
    padding-left: 32px;
    padding-right: 32px;
}

.bambu-topbar__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.bambu-topbar__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    color: var(--bambu-topbar-link, #ffffff);
    background: rgba(255, 255, 255, 0.08);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.bambu-topbar__link:hover,
.bambu-topbar__link:focus-visible {
    color: var(--bambu-topbar-link-hover, #e6f7f1);
    background: rgba(255, 255, 255, 0.18);
}

.bambu-topbar__link--secondary {
    background: rgba(0, 0, 0, 0.15);
}

.bambu-topbar__close {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    line-height: 1;
    z-index: 1;
}

.bambu-topbar__close--right {
    right: 12px;
}

.bambu-topbar__close--left {
    left: 12px;
}

.bambu-topbar__close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.bambu-topbar__debug {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.75;
}

.bambu-topbar__badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.25);
}

.bambu-topbar--debug .bambu-topbar__badge {
    position: relative;
}

@media (max-width: 900px) {
    .bambu-topbar__inner {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .bambu-topbar__content {
        padding-left: 40px;
        padding-right: 40px;
    }

    .bambu-topbar__links {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 640px) {

    .bambu-topbar[data-bambu-hide-mobile="1"],
    .bambu-topbar.bambu-topbar--hide-mobile {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {

    .bambu-topbar,
    .bambu-topbar__link {
        transition: none;
    }
}

.bambu-topbar.bstb-loaded {
    opacity: 1;
    transform: translateY(0);
}