/* Contain fixed-size provider creatives inside their placement on small screens
   and in narrow rails. A provider's iframe keeps its requested dimensions. */
[data-publisher-ad].publisher-ad-filled {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  text-align: center;
}
:where([data-publisher-ad]).publisher-ad-filled {
  margin-block: 16px;
}
:where([data-publisher-ad]).publisher-ad-filled::before {
  content: "Advertisement";
  display: block;
  margin-bottom: 4px;
  font: 11px/16px Arial, sans-serif;
  text-align: center;
}
[data-publisher-ad].publisher-ad-filled > a:has(> img:only-child),
[data-publisher-ad].publisher-ad-filled > img,
[data-publisher-ad].publisher-ad-filled > a > img:only-child {
  max-width: 100%;
}
[data-publisher-ad].publisher-ad-filled > img,
[data-publisher-ad].publisher-ad-filled > a > img:only-child {
  height: auto;
}

/* Match the configured banner's fixed inline box and the theme's own caption
   and margins. Without scripting the connector will never fill this space. */
[data-publisher-ad][data-ad-reserved] { display: none !important; }
@media (scripting: enabled) {
  [data-publisher-ad][data-ad-reserved] { display: block !important; visibility: hidden; }
  [data-publisher-ad][data-ad-reserved]::after {
    content: "";
    display: var(--banner-display);
    width: var(--banner-width);
    max-width: 100%;
    height: var(--banner-height);
    overflow: hidden;
  }
}
