/* BW – Tryb żałoby, style odizolowane prefiksem bwmm. */
#bwmm-banner { display: none; }
body.bwmm-active #bwmm-banner { display: block; }
.bwmm-banner {
    position: relative; z-index: 5; width: 100%; box-sizing: border-box;
    color: #fff; background: #202020; border-bottom: 1px solid #555;
    font: 400 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.bwmm-banner *, .bwmm-banner *::before, .bwmm-banner *::after { box-sizing: border-box; }
.bwmm-banner__inner { max-width: 1280px; margin: 0 auto; padding: 12px 20px; min-height: 70px; display: flex; align-items: center; gap: 16px; }
.bwmm-banner__ribbon { flex: 0 0 25px; width: 25px; color: #fff; }
.bwmm-banner__content { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bwmm-banner__content strong { font: 700 17px/1.25 system-ui, -apple-system, "Segoe UI", sans-serif; color: #fff; }
.bwmm-banner__content span { color: #fff; }
.bwmm-banner__link, .bwmm-banner__link:visited {
    flex: 0 0 auto; color: #fff !important; font: 600 14px/1.4 system-ui, sans-serif;
    text-decoration: underline !important; text-underline-offset: .2em;
}
.bwmm-banner__link:hover { background: #414141; color: #fff !important; }
.bwmm-banner__toggle, .bwmm-banner__toggle:hover, .bwmm-banner__toggle:focus {
    appearance: none; flex: 0 0 auto; padding: 8px 12px; border-radius: 3px;
    border: 1px solid #fff; color: #fff; background: #202020;
    font: 600 14px/1.4 system-ui, sans-serif; cursor: pointer; text-transform: none;
}
.bwmm-banner__toggle:hover { background: #414141; }
.bwmm-banner :is(a, button):focus-visible {
    outline: 3px solid #fff !important; outline-offset: 3px; box-shadow: 0 0 0 6px #202020;
}
@media (max-width: 767px) {
    .bwmm-banner__inner { flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; padding: 12px 16px; }
    .bwmm-banner__content { flex-basis: calc(100% - 43px); }
    .bwmm-banner__content strong { font-size: 16px; }
    .bwmm-banner__link { margin-left: 37px; }
    .bwmm-banner__toggle { margin-left: 37px; }
}
/* Odbarwianie przez neutralną warstwę nad viewportem. Nie modyfikujemy body::after
   ani kontekstów pozycjonowania motywu. Wtyczka nie wstawia nakładki bez JS. */
#bwmm-overlay { display: contents; pointer-events: none; }
body.bwmm-active.bwmm-bw.bwmm-full #bwmm-overlay > .bwmm-overlay__segment {
    position: fixed; z-index: 2147483000; pointer-events: none;
    background: #fff; mix-blend-mode: saturation;
    margin: 0; padding: 0; border: 0;
}
/* Tryb lżejszy: odbarwienie tylko mediów, z pominięciem wyjątków. */
body.bwmm-active.bwmm-bw.bwmm-media :is(img, svg, canvas, video):not(.bwmm-media-original) { filter: grayscale(1); }
body.bwmm-active.bwmm-bw.bwmm-media .bwmm-media-original,
body.bwmm-active.bwmm-bw.bwmm-media .bwmm-media-original :is(img, svg, canvas, video) { filter: none !important; }
/* Nawigacje do podwyższenia kontrastu są wskazywane w panelu ustawień. */
body.bwmm-active.bwmm-bw .bwmm-nav { background-color: #222 !important; color: #fff !important; }
body.bwmm-active.bwmm-bw .bwmm-nav :is(a, button, span, i) { color: #fff !important; opacity: 1 !important; text-shadow: none !important; }
body.bwmm-active.bwmm-bw .bwmm-nav :is(a, button):is(:hover, :focus-visible) { color: #fff !important; background-color: #454545 !important; }
body.bwmm-active.bwmm-bw .bwmm-nav :is(.sub-menu, .children, .sf-menu ul, [role="menu"]) { background: #fff !important; color: #111 !important; }
body.bwmm-active.bwmm-bw .bwmm-nav :is(.sub-menu, .children, .sf-menu ul, [role="menu"]) :is(a, button, span, i) {
    color: #111 !important; opacity: 1 !important;
}
body.bwmm-active.bwmm-bw .bwmm-nav :is(.sub-menu, .children, .sf-menu ul, [role="menu"]) :is(a, button):is(:hover, :focus-visible) {
    background-color: #ececec !important; color: #111 !important;
}
body.bwmm-active.bwmm-bw .bwmm-nav :is(a, button):focus-visible {
    outline: 3px solid #fff !important; outline-offset: 2px; box-shadow: 0 0 0 5px #111;
}
body.bwmm-active.bwmm-bw .bwmm-nav :is(.sub-menu, .children, .sf-menu ul, [role="menu"]) :is(a, button):focus-visible {
    outline-color: #111 !important; box-shadow: 0 0 0 5px #fff;
}
/* Wyjątek systemowy: ustawienia wysokiego kontrastu są ważniejsze niż dekoracja. */
@media (forced-colors: active) {
    #bwmm-overlay { display: none !important; }
    body.bwmm-active.bwmm-bw.bwmm-media :is(img, svg, canvas, video) { filter: none !important; }
    body.bwmm-active.bwmm-bw .bwmm-nav { background: Canvas !important; color: CanvasText !important; }
    body.bwmm-active.bwmm-bw .bwmm-nav :is(a, button, span, i) { color: LinkText !important; }
    .bwmm-banner { background: Canvas; color: CanvasText; border-bottom-color: CanvasText; }
    .bwmm-banner__content strong, .bwmm-banner__content span, .bwmm-banner__ribbon { color: CanvasText; }
    .bwmm-banner__link, .bwmm-banner__link:visited { color: LinkText !important; }
    .bwmm-banner__toggle { background: ButtonFace; color: ButtonText; border-color: ButtonText; }
}
@media print {
    #bwmm-overlay { display: none !important; }
    body.bwmm-active.bwmm-bw.bwmm-media :is(img, svg, canvas, video) { filter: none !important; }
}
