/* Linked while "Header stays at the top while scrolling" is on under Menus & Appearance > Appearance.
   Run "npm run rtl" after changing this file. */

/* The header stays at the top while the page scrolls. Its layer is under Bootstrap's backdrops,
   and rises above them while the mobile menu, which lives inside it, is open. */
.header-area {
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
    transition: top .25s ease;
}

.header-area:has(.offcanvas.show, .offcanvas.showing, .offcanvas.hiding) {
    z-index: 1046;
}

/* The bar above the header scrolls away going down and slides back going up. The classes and the
   bar's height come from partials/site/sticky_header. */
html.has-top-bar .sub-header {
    position: sticky;
    top: calc(-1 * var(--top-bar-height));
    z-index: 1031;
    background-color: #fff;
    transition: top .25s ease;
}

html.top-bar-shown {
    --top-bar-offset: var(--top-bar-height);
}

html.top-bar-shown .sub-header {
    top: 0;
}

html.top-bar-shown .header-area {
    top: var(--top-bar-offset);
}

@media (prefers-reduced-motion: reduce) {
    .header-area,
    html.has-top-bar .sub-header {
        transition: none;
    }
}

/* What jumps or sticks to the top stops below the header. */
html:has(.header-area) {
    scroll-padding-top: 90px;
}

.header-area ~ section .static-menu {
    top: calc(76px + var(--top-bar-offset, 0px));
}

.header-area ~ section .bundle-details.pricing-card {
    top: calc(90px + var(--top-bar-offset, 0px));
}

@media only screen and (min-width: 992px) {
    .header-area ~ section .page-static-sidebar {
        top: calc(90px + var(--top-bar-offset, 0px));
    }
}
