/* components/outpost.css — the boxes Outpost's script inserts into a
   post's body (partials/integrations/outpost.hbs). Each is a
   .outpost-pub-container, placed between paragraphs of .post-content, so
   ghost-content.css would hold it to the reading measure. Ported from
   hyperallergic-source's screen.css and code-injection.css. */

/* Ad boxes are 960×540 creatives: out to the wide-card width, like
   .kg-width-wide. The upgrade box is text, so it keeps the measure. */
.post-content > .outpost-pub-container:not(.outpost-modern-upgrade-box) {
  max-width: var(--content-wide);
}

/* The ad inside: Outpost's html box drops one of our own GPT slots
   (hyp-1 to hyp-4, defined in default.hbs) into the post as
   .responsive-gpt-ad > #div-gpt-ad-…, so it gets .ad-slot__frame's
   treatment (components/ad-slot.css): centred, and scaled down to fit by
   default.hbs's --ad-scale, which it sets on the slot div. The negative
   margin gives back the height the scaled creative no longer fills. */
.responsive-gpt-ad > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3) var(--space-8) var(--space-8);
  background-color: var(--color-bg-tone);
}

.responsive-gpt-ad > div::before {
  content: "Advertisement";
  padding-block-end: var(--space-1);
  color: var(--color-fg-tone);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}

.responsive-gpt-ad > div > div {
  transform: scale(var(--ad-scale, 1));
  transform-origin: top center;
  margin-block-end: calc(var(--ad-height, 0px) * (var(--ad-scale, 1) - 1));
}

/* The reset's max-width: 100% would squash the creative instead. */
.responsive-gpt-ad iframe {
  max-width: none;
}

@media print {
  .outpost-pub-container,
  .outpost-cta {
    display: none !important;
  }
}
