/* ads.css — ad slots (ADR-0007), on the pages that show one.
   Markup: src/components/AdSlot.tsx. JS hooks, keep: .ad, .ad__unit, data-ad-* (ads.js).
   A banner's height is reserved before the ad fills, so a banner moves nothing under it. A slot
   AdSense leaves unfilled, one whose script never loaded (an ad blocker), or one for a reader who
   is shown no ads, is removed. */

.ad {
  display: grid;
  gap: var(--space-1);
  margin: var(--space-6) 0;
}

.ad[hidden],
.ad:has(ins[data-ad-status='unfilled']) {
  display: none;
}

.ad__label {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.ad__unit {
  min-height: 90px;
  overflow: hidden;
  background: var(--color-bg-subtle);
  border-radius: var(--radius-sm);
}

/* AdSense measures the width of the element it fills; it must be a block. */
.ad__unit ins {
  display: block;
}

.ad--index-sidebar {
  margin: 0;
}

.ad--index-sidebar .ad__unit {
  min-height: 250px;
}

.ad__remove {
  justify-self: end;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

/* The footer's Cookie choices: a button dressed as the footer's links (chrome.css). */
.footer__choices {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.footer__choices[hidden] {
  display: none;
}
