/* Banner ad slots. See plans/feature-09-banner-ads.md */

/* Height is reserved up front so the page does not jump when the ad appears */
.ad-slot {
  display: block;
  box-sizing: border-box;
  min-height: 100px;
  max-width: 100%;
  margin: 24px auto;
  text-align: center;
  white-space: normal;
}

/* No ad for this page (or ads.json failed to load): collapse the slot */
.ad-slot--empty {
  display: none;
}

/* In-content ad: sits right under the intro text and close to the code below.
   The site leaves 70px below the intro section and 50px above the code; both
   shrink only while an ad is actually showing. */
.ad-slot--incontent {
  margin: 16px auto 12px;
}

.plates:has(.ad-slot--incontent:not(.ad-slot--empty)) {
  margin-bottom: 16px;
}

.plates:has(.ad-slot--incontent:not(.ad-slot--empty)) + .languages .container {
  padding-top: 16px !important; /* the template sets padding-top: 50px inline */
}

.ad-slot__label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a8f98;
}

.ad-slot__link {
  display: inline-block;
  max-width: 100%;
}

.ad-slot img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
