/*
 * Edition v1.03.0-alpha.7: main SITE HEADER ONLY is sticky.
 * The page/category title, description, breadcrumbs and article content are
 * siblings of #masthead in #page and remain in normal scroll flow.
 * Never enable Core's competing sticky-header JS or Edition's legacy fixed
 * inner-header JS at the same time as this rule.
 */
body #page > #masthead.site-header {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0;
    z-index: 1000;
    align-self: stretch;
    background-color: var(--machaxis-edition-white, #fff) !important;
    background-image: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* Ensure the navigation bar remains opaque in light and dark modes. */
body #page > #masthead.site-header #machaxis-edition-header-inner {
    background-color: var(--machaxis-edition-white, #fff) !important;
    background-image: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* WordPress desktop admin bar stays above the pinned site header. */
body.admin-bar #page > #masthead.site-header {
    top: 32px;
}

/* WordPress tablet admin bar is 46px tall. */
@media screen and (max-width: 782px) {
    body.admin-bar #page > #masthead.site-header {
        top: 46px;
    }
}

/* On narrow mobile screens WordPress admin bar scrolls away. */
@media screen and (max-width: 600px) {
    body.admin-bar #page > #masthead.site-header {
        top: 0;
    }
}
