/*
 * The badge row itself only lays the images out. Where the row sits on the card
 * — the overlay position, the inset — is the Designer's job, set on the element
 * this component is dropped into, exactly as the existing cards do it.
 */

.ofl-campaign-badges {
  display: flex;
  /* The wrapper is block-level, so it fills the element it is dropped into and
     would otherwise pack the badges against the left edge however the Designer
     has aligned that element. Badges sit top-right on every card in the design,
     so the row aligns itself rather than depending on the parent being set up
     for it. Override on the parent with `display: contents` on this class if a
     card ever wants the images laid out by its own container instead — the gap
     then comes from that container, not from here. */
  justify-content: flex-end;
  gap: 4px;
}

.ofl-campaign-badges img {
  /* Matches .ofl-card-badges on the React cards, so a hand-built card and a
     filtered-list card show the same badge at the same size. */
  width: var(--ofl-campaign-badge-width, 70px);
  height: auto;
  display: block;
}

/* The canvas stand-in: something selectable while the slug is unbound. */
.ofl-campaign-badges--placeholder {
  width: var(--ofl-campaign-badge-width, 70px);
  aspect-ratio: 68 / 70;
  border: 1px dashed currentColor;
  opacity: 0.4;
}

@media (max-width: 991px) {
  .ofl-campaign-badges img,
  .ofl-campaign-badges--placeholder {
    width: var(--ofl-campaign-badge-width-mobile, 40px);
  }
}

