/* AFFLIGO - ad slot styles.
   Loaded ONLY on the pages that carry an ad slot (see tests/ads-check.js).

   The container is a centred block with an 18px top margin: it sits clear of
   the content above it, it never overlaps anything, and the reader reaches it
   only after the part they came for.

   - The label is a real text node, so it is readable by screen readers and
     by anyone with images off.
   - The ad body reserves the exact ad height (--ad-h) before the network
     script arrives, so filling the slot shifts nothing (no CLS).
   - If the ad never arrives the reserved height is removed again, so a
     blocked script leaves no hole.
   - Nothing here can position an element over the tool UI: the slot is a
     normal block in the content flow. */
.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 18px auto 26px;          /* 18px clear of the content above */
  max-width: 900px;
  padding: 0 16px;
  text-align: center;
}

/* Collapsed: no fill, blocked, or consent refused. */
.ad-slot.is-empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ad-slot-label {
  display: block;
  font-size: 0.68rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  opacity: 0.7;
  margin: 0;
}

/* The Adsterra script appends its iframe here.
   The height is reserved from the very first paint, by CSS alone, so the ad
   arriving never shifts the page. The 760px breakpoint is the same rule the
   script uses to pick the zone: the slot has 16px of padding on each side,
   so a viewport of 760px leaves exactly 728px for the 728x90 banner. */
.ad-slot-body {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 50px;             /* the 320x50 mobile banner */
}

@media (min-width: 760px) {
  .ad-slot-body {
    min-height: 90px;           /* the 728x90 desktop banner */
  }
}

.ad-slot.is-empty .ad-slot-body {
  min-height: 0 !important;     /* nothing filled the slot: take the space back */
}

.ad-slot-body iframe {
  display: block;
  border: 0;
  max-width: 100%;      /* never overflow a narrow slot */
}
