/* BAO Sticky 2.0.2 – Menü-/Dropdown-Ebenen korrigiert */
.bao-sticky-host {
    position: relative;
    width: 100%;
    /*
     * Die normale Leiste liegt im Dokumentfluss und darf keinen eigenen
     * hohen Stapelkontext erzeugen. Sonst liegt sie über Astroid-Dropdowns.
     */
    z-index: auto;
    background: rgba(245, 233, 191, .96);
    padding: 5px 12px;
    border-top: 1px solid rgba(80, 60, 20, .08);
    border-bottom: 1px solid rgba(80, 60, 20, .12);
    box-shadow: none;
}

.bao-sticky-overlay {
    position: fixed;
    top: var(--bao-sticky-current-top, 0px);
    left: 0;
    right: 0;
    width: 100%;
    /*
     * Unterhalb der Astroid-Menüs, aber oberhalb des Seiteninhalts.
     * Der PHP-Code begrenzt den einstellbaren Wert zusätzlich auf 900.
     */
    z-index: var(--bao-sticky-z, 900);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-3px);
    transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
}

.bao-sticky-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
}

.bao-sticky-inner {
    width: 100%;
    max-width: var(--bao-sticky-max, 1200px);
    margin: 0 auto;
}

.bao-sticky-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-width: 0;
    white-space: nowrap;
}

.bao-sticky-label {
    flex: 0 0 auto;
    font-weight: 600;
    color: #4b4028;
}

.bao-sticky-module { min-width: 0; }
.bao-sticky-host .bao-adoptioninfo { max-width: none; margin: 0; }

.bao-sticky-host:not(.bao-sticky-show-title) .bao-adoptioninfo__heading,
.bao-sticky-host:not(.bao-sticky-show-title) .module-title,
.bao-sticky-host:not(.bao-sticky-show-title) h1,
.bao-sticky-host:not(.bao-sticky-show-title) h2,
.bao-sticky-host:not(.bao-sticky-show-title) h3,
.bao-sticky-host:not(.bao-sticky-show-title) h4 {
    display: none !important;
}

.bao-sticky-host .bao-adoptioninfo__line {
    flex-wrap: nowrap;
    gap: .3rem;
    min-height: 34px;
    padding: .2rem .25rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.bao-sticky-host .bao-adoptioninfo__item { padding: .2rem .45rem; }


/* Astroid-Header und seine Dropdowns müssen immer über der BAO-Leiste liegen. */
#astroid-header,
#astroid-sticky-header {
    position: relative;
    z-index: 1100 !important;
}

#astroid-header .megamenu-container,
#astroid-header .nav-submenu-container,
#astroid-header .nav-submenu,
#astroid-sticky-header .megamenu-container,
#astroid-sticky-header .nav-submenu-container,
#astroid-sticky-header .nav-submenu {
    z-index: 1200 !important;
}

[data-bs-theme="dark"] .bao-sticky-host {
    background: rgba(47, 51, 66, .96);
    border-color: rgba(254, 195, 77, .16);
}

[data-bs-theme="dark"] .bao-sticky-label { color: #f0dfb4; }

@media (max-width: 767px) {
    .bao-sticky-overlay:not(.bao-sticky-mobile) { display: none !important; }
    .bao-sticky-row { flex-wrap: wrap; white-space: normal; }
}

@media (max-width: 575.98px) {
    .bao-sticky-row { align-items: stretch; flex-direction: column; gap: .2rem; }
    .bao-sticky-label { text-align: center; }
    .bao-sticky-host .bao-adoptioninfo__line {
        align-items: stretch;
        flex-direction: column;
        min-height: 0;
    }
}
