/* Q2: od 1440 px baner zgód wraca do zwykłego ciągu, nad treścią strony.
   Wąski pas P4 (80×804) łamał tekst i zasłaniał skraj przełącznika języka.
   Karta ma 420 px. Na części szablonów baner jest dzieckiem body, na wpisie
   (WEDM) dzieckiem #wrapper — obie ścieżki dostają tę samą kartę.
   Przycisk ustawień zostaje w rogu i dostaje nieprzezroczyste tło.
   Poniżej 1440 px ten plik nic nie zmienia. */

@media (min-width: 1440px) {
  html:root body:has(> .seopress-user-consent.seopress-user-message:not(.seopress-user-consent-hide)),
  html:root #wrapper:has(> .seopress-user-consent.seopress-user-message:not(.seopress-user-consent-hide)) {
    display: flex;
    flex-direction: column;
  }

  html:root body:has(> .seopress-user-consent.seopress-user-message:not(.seopress-user-consent-hide)) > #wrapper {
    width: 100%;
    min-width: 0;
  }

  html:root :is(body, #wrapper) > .seopress-user-consent.seopress-user-consent.seopress-user-consent.seopress-user-message.seopress-user-message:not(.seopress-user-consent-hide):not(.seopress-edit-choice) {
    order: -1;
    align-self: center;
    position: relative !important;
    inset: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    top: auto !important;
    width: 420px !important;
    max-width: calc(100vw - 32px) !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    margin: 12px auto !important;
    overflow: visible !important;
    z-index: 1 !important;
  }

  html:root :is(body, #wrapper) > .seopress-user-consent.seopress-user-consent.seopress-user-consent.seopress-user-message.seopress-user-message:not(.seopress-user-consent-hide):not(.seopress-edit-choice) :is(p, a, button, li, span) {
    overflow-wrap: normal !important;
    white-space: normal !important;
    max-width: 100% !important;
  }

  html:root :is(body, #wrapper) > .seopress-user-consent.seopress-user-consent.seopress-user-consent.seopress-user-message.seopress-user-message:not(.seopress-user-consent-hide):not(.seopress-edit-choice) .ecad-cb-przyciski {
    position: static !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start;
    gap: 8px;
    width: auto !important;
  }

  html:root :is(body, #wrapper) > .seopress-user-consent.seopress-user-consent.seopress-user-consent.seopress-user-message.seopress-user-message:not(.seopress-user-consent-hide):not(.seopress-edit-choice) .ecad-cb-przyciski button {
    flex: 0 1 auto !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 8rem !important;
    min-height: 44px !important;
    height: auto !important;
    padding: 8px 16px !important;
    white-space: nowrap !important;
  }

  html:root body .ecad-cookies-ustawienia.ecad-cookies-ustawienia {
    color: #fff !important;
    -webkit-text-fill-color: currentColor !important;
    background-color: #111315 !important;
    transition: none !important;
    display: block !important;
    height: auto !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    text-align: center;
  }

  html:root body .ecad-cookies-ustawienia.ecad-cookies-ustawienia:focus,
  html:root body .ecad-cookies-ustawienia.ecad-cookies-ustawienia:focus-visible {
    outline: 3px solid #111315 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 3px #fff !important;
  }
}

@media (min-width: 1440px) and (forced-colors: active) {
  html:root body .ecad-cookies-ustawienia.ecad-cookies-ustawienia:focus,
  html:root body .ecad-cookies-ustawienia.ecad-cookies-ustawienia:focus-visible {
    outline: 3px solid CanvasText !important;
    box-shadow: none !important;
  }
}

@media (max-width: 767px) {
  .nw #nw-tresc :is(.sp-hero__tekst, .sz-hero__tekst) > h1#nw-h1 {
    justify-self: stretch;
    width: auto;
    max-width: 100%;
  }

  /* Te nagłówki mają w HTML odstępy przed wymuszonymi podziałami linii. */
  .nw .sp-hero__tekst > h1[data-sp-h1]:not(:lang(tr)) > br,
  .nw .sz-hero__tekst > h1[data-sz-h1] > br {
    display: none;
  }
}
