/* STEC's empty, fixed notification layer must stay transparent in every palette.
   Pojo otherwise applies an opaque background to all divs, covering the page.
   Notification contents keep the selected contrast palette. */
body.pojo-a11y-high-contrast #_rht_toaster.stec-toaster,
body.pojo-a11y-negative-contrast #_rht_toaster.stec-toaster,
body.pojo-a11y-light-background #_rht_toaster.stec-toaster {
    background: transparent !important;
}

/* A filter on body makes fixed controls scroll with the document. The root
   element is exempt from creating that containing block. */
html:has(> body.pojo-a11y-grayscale) {
    filter: grayscale(1);
}
body.pojo-a11y-grayscale {
    filter: none !important;
}

#pojo-a11y-toolbar .pojo-a11y-toolbar-overlay {
    max-height: calc(100vh - 200px);
    max-height: calc(100dvh - 200px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

#pojo-a11y-toolbar a:focus-visible {
    outline: 3px solid currentColor !important;
    outline-offset: -3px;
}

@media (max-height: 600px) {
    body #pojo-a11y-toolbar { top: 16px !important; }
    #pojo-a11y-toolbar .pojo-a11y-toolbar-overlay {
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
    }
}

/* Keep the mobile toggle below both the logo and the expanded search field. */
@media (max-width: 767px) {
    body #pojo-a11y-toolbar { top: 200px !important; }
    #pojo-a11y-toolbar .pojo-a11y-toolbar-overlay {
        max-height: calc(100vh - 216px);
        max-height: calc(100dvh - 216px);
    }
}
