/**
 * Revive header ad (zone 1).
 *
 * Both layers keep their 970x250 layout size and are transformed exactly once.
 * The slot height is set from the same scale by assets/js/header-ad.js.
 */
#itmk-market-header-ad {
  aspect-ratio: 970 / 250;
  height: var(--itmk-header-ad-height, auto) !important;
  overflow: hidden;
}

#itmk-market-header-ad > iframe,
#itmk-market-header-ad > .itmk-market-fallback {
  box-sizing: border-box;
  height: 250px !important;
  max-width: none !important;
  min-width: 970px;
  transform: scale(var(--itmk-header-ad-scale, var(--itmk-banner-scale, 1))) !important;
  transform-origin: top left;
  width: 970px !important;
}

/* Never paint the branded fallback while Revive is still loading. */
#itmk-market-header-ad > .itmk-market-fallback {
  display: none !important;
}

#itmk-market-header-ad.is-fallback-visible > .itmk-market-fallback {
  display: block !important;
}

/* A failed frame must not sit above the now-actionable fallback link. */
#itmk-market-header-ad.is-frame-unavailable > iframe {
  display: none !important;
}
