/*
 * VibeCMS Core Web Vitals P1 — CLS Stabilizer
 * 2026-08-11 / build 6.5.16
 *
 * Loaded after theme CSS and global-ad-layout.css.
 * Reserves space only for ad wrappers that actually contain configured code.
 */

.si-ad-reserved[data-ad-reserve="1"] {
  min-height: var(--si-ad-reserve-desktop, 90px) !important;
  box-sizing: border-box !important;
}

.si-ad-reserved[data-ad-reserve="1"] > center,
.si-ad-reserved[data-ad-reserve="1"] > .row,
.si-ad-reserved[data-ad-reserve="1"] > div {
  box-sizing: border-box;
  max-width: 100%;
}

/* Keep the reserved lane alive while an async ad network decides its final size. */
.si-ad-reserved[data-ad-reserve="1"] ins.adsbygoogle,
.si-ad-reserved[data-ad-reserve="1"] iframe {
  max-width: 100% !important;
}

/* Exact width/height attributes added server-side provide the intrinsic ratio. */
.article-inline-media[width][height] {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
}

/* Common video embeds get an intrinsic 16:9 box before the iframe loads. */
.article-inline-frame[data-cwv-ratio="16-9"] {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}

@media (max-width: 767px) {
  .si-ad-reserved[data-ad-reserve="1"] {
    min-height: var(--si-ad-reserve-mobile, 250px) !important;
  }

  /* Article ad code may use a legacy 728 class even on responsive inventory.
     Reservation follows the slot, not the old class name. */
  body.article-page .si-ad-reserved[data-ad-slot^="leftbanner"],
  body.article-page .si-ad-reserved[data-ad-slot^="dalamartikel"],
  body[class*="article-page"] .si-ad-reserved[data-ad-slot^="leftbanner"],
  body[class*="article-page"] .si-ad-reserved[data-ad-slot^="dalamartikel"] {
    min-height: var(--si-ad-reserve-mobile, 250px) !important;
  }
}
