.tko-ad {
  border-bottom: 1px solid #e5e7eb;
  border-top: 1px solid #e5e7eb;
  box-sizing: border-box;
  clear: both;
  margin: 2rem auto;
  max-width: 100%;
  padding: 0.75rem 0 1rem;
  text-align: center;
  contain: layout paint;
  isolation: isolate;
}

.tko-ad__label,
.td-adspot-title,
.tko-idm-auto-box > .tko-ad__label,
.tko-idm-relocated > .tko-ad__label {
  color: #555 !important;
  display: block;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  line-height: 1.5 !important;
  text-align: center !important;
  text-transform: uppercase !important;
}

.tko-ad__label {
  margin-bottom: 0.375rem;
}

.tko-ad__slot,
.tko-ad__gam {
  margin-left: auto;
  margin-right: auto;
  min-height: var(--tko-ad-desktop-height);
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

/* Stara oprawa TagDiv pozostaje tylko punktem ukladu. Widoczna jest jedna
   etykieta i nie ma juz linku handlowego przy boksie zarzadzanym przez plugin. */
.td-a-ad:has(.tko-ad--managed) > .td-adspot-title,
.tko-ad-wrapper:has(.tko-ad--managed) > .tko-ad-order {
  display: none !important;
}

.tko-ad-wrapper:has(.tko-ad--managed),
.tko-ad-wrapper:has(.tko-ad--managed) .tko-ad-slot {
  max-width: 100% !important;
  width: 100% !important;
}

.tko-kwords-relocated {
  box-sizing: border-box;
  clear: both;
  margin: 1.5rem auto;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
}

.tko-idm-auto-box,
.tko-idm-relocated {
  border-bottom: 1px solid #e5e7eb;
  border-top: 1px solid #e5e7eb;
  box-sizing: border-box;
  clear: both;
  margin: 2rem auto;
  max-width: 100%;
  overflow: hidden;
  padding: 0.75rem 0 1rem;
  position: relative;
  text-align: center;
}

.tko-idm-auto-box > .tko-ad__label,
.tko-idm-relocated > .tko-ad__label {
  display: block !important;
  margin-bottom: 0.375rem !important;
}

/* Starsze placementy IDM/TagDiv nie zawsze sa przejmowane jako AutoAds.
   Ich bezposredni kontener dostaje taka sama pelna oprawe z dwiema liniami. */
body.single-post .td-a-ad:has(> .td-adspot-title) {
  border-bottom: 1px solid #e5e7eb !important;
  border-top: 1px solid #e5e7eb !important;
  box-sizing: border-box;
  clear: both;
  margin-bottom: 2rem;
  margin-top: 2rem;
  padding-bottom: 1rem;
  padding-top: 0.75rem;
}

.td_block_wrap:has(.tko-google-source-btn) {
  clear: both;
  margin-top: 1rem;
  position: relative;
  z-index: 2;
}

.tko-ad--managed {
  min-height: calc(var(--tko-ad-desktop-height) + 54px);
  width: 100%;
}

.tko-ad-desktop-c-host {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 1124px;
  width: calc(100% - 30px);
}

body.home .tko-ad-desktop-c-host {
  margin-bottom: 2rem;
  margin-top: 2rem;
}

/* Dla GAM deklarowana wysokosc jest calym budzetem rezerwy CLS. Oprawa
   (etykieta, padding i obramowanie) miesci sie w tych 250 px, a nie ponad nimi. */
@media (min-width: 768px) {
  .tko-ad--managed[data-tko-provider="gam"] {
    min-height: var(--tko-ad-desktop-height);
  }

  .tko-ad--managed[data-tko-provider="gam"] .tko-ad__gam {
    min-height: max(0px, calc(var(--tko-ad-desktop-height) - 54px));
  }
}

.tko-ad-wrapper .tko-ad-slot {
  max-width: 100% !important;
  width: 100% !important;
}

.tko-ad--mobile-only {
  display: none;
}

.tko-ad__device--desktop {
  display: block;
}

.tko-ad__device--mobile {
  display: none;
}

.tko-ad--managed[data-tko-provider="idmnet"] .tko-ad__idm {
  min-height: var(--tko-ad-desktop-height);
  overflow: visible;
}

.tko-ad[data-tko-rendered="1"] {
  visibility: visible;
}

.tko-ad[data-tko-provider="idmnet"] .tko-ad__slot {
  min-height: var(--tko-ad-desktop-height, 250px);
}

.tko-ad__idm-mobile {
  display: none;
}

.tko-ad__idm-desktop {
  display: block;
  margin-top: 1rem;
}

.tko-ad--local .tko-ad__idm-desktop {
  min-height: var(--tko-ad-desktop-height, 250px);
}

.tko-ad--local {
  border-top: 0;
  min-height: 310px;
  padding-top: 0;
}

.tko-ad--local .tko-ad__label {
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
}

/* Taboola wstrzykuje wlasne, bardziej szczegolowe reguly z fontem Roboto.
   Ograniczamy nadpisanie do tekstowych elementow widzetu, aby nie naruszyc ikon. */
#taboola-below-article-widget .video-title,
#taboola-below-article-widget .video-label,
#taboola-below-article-widget .branding,
#taboola-below-article-widget .tbl-data-field,
#taboola-below-article-widget .trc_attribution_position_after_branding,
#taboola-below-article-widget .item-label-href {
  font-family: Verdana, Geneva, sans-serif !important;
}

body.single-post .tko-ad--article-sidebar {
  box-sizing: border-box;
  margin: 0 auto 32px;
  min-height: 654px;
  overflow: visible;
  width: 100%;
}

body.single-post .tko-ad--article-sidebar .tko-ad__idm {
  min-height: 600px;
}

@media (min-width: 768px) {
  .tko-ad--local {
    width: calc(100% - 30px);
    max-width: 1124px;
  }
}

@media (max-width: 767px) {
  /* Newspaper dodaje po slotach osobne bloki odstepu. Przy zarzadzanym
     boksie sa zbedne i tworza duza dziure przed wyszukiwarka. */
  .tko-ad--managed + .td_block_empty_space {
    display: none !important;
  }

  body.single-post .tko-ad[data-tko-placement="idm_m_inside_0"] {
    display: none !important;
    min-height: 0 !important;
  }

  .tko-ad--managed {
    min-height: calc(var(--tko-ad-mobile-height) + 54px);
  }

  .tko-ad--desktop-only {
    display: none;
    min-height: 0;
  }

  .tko-ad--mobile-only {
    display: block;
  }
  .tko-ad__device--desktop {
    display: none;
  }

  .tko-ad__device--mobile {
    display: block;
    max-width: 100%;
    overflow: hidden;
  }

  .tko-ad--managed[data-tko-provider="idmnet"] .tko-ad__idm {
    min-height: var(--tko-ad-mobile-height);
    overflow: visible;
  }
  .tko-ad--local {
    min-height: 340px;
  }
  .tko-ad--local .tko-ad__gam {
    display: none;
    min-height: 0;
  }

  .tko-ad__slot,
  .tko-ad__gam {
    min-height: var(--tko-ad-mobile-height);
  }

  .tko-ad__idm-mobile {
    display: block;
    margin-top: 1rem;
    min-height: var(--tko-ad-mobile-height, 280px);
  }

  .tko-ad__idm-desktop {
    display: none;
  }
}

