/*
 * Shared overview campaign panel (components/promo/campaign.html).
 *
 * The component root is `.row-promo`, which expects to be a flex child of the dashboard
 * content column and to take the full width. Rendering it through x-component inserts a
 * host element between the two, so the host must not create a layout box of its own -
 * otherwise the row collapses to its min-content width and the hero/column split breaks.
 */
.promo-campaign-host {
  display: contents;
}

/*
 * Right-hand column: the campaign card stacks over the gallery row. Its internal gap uses the
 * same gutter as the panel's own gutter against the hero, and the column grows by exactly the
 * extra gap so neither the card nor the gallery row loses any height.
 */
.promo-split-column {
  gap: var(--gf-overview-gap, 24px);
  height: calc(240px + var(--gf-overview-gap, 24px) - 16px);
}

/*
 * The gallery row's cards sit on the same gutter as the panel's own gaps, so the space
 * between the three tiles reads as the same rhythm as the space beside the hero.
 */
.promo-mini-ads-row {
  gap: var(--gf-overview-gap, 24px);
}

/*
 * Where each "Ad" mark sits. Pinned here rather than in the per-role dashboard sheets so the
 * placement cannot drift with them: the hero mark belongs in the banner's top-left corner.
 */
.gf-promotion-ad-menu {
  position: absolute;
  z-index: 12;
  line-height: 1;
}

.gf-promotion-ad-menu.promo-ad-menu--overview {
  top: 12px;
  right: auto;
  left: 12px;
}

.gf-promotion-ad-menu.promo-ad-menu--mini {
  top: 8px;
  right: auto;
  left: 8px;
}

.gf-promotion-ad-menu.campaign-ad-menu {
  top: 20px;
  right: auto;
  left: 20px;
}

.sidebar-ad-menu.gf-promotion-ad-menu {
  top: 8px;
  right: auto;
  left: 8px;
}

/*
 * The "Ad" mark on a promotion is a menu trigger (Report / Not interested), but it keeps the
 * typography and placement of the badge it replaced: the badge sizes, the badge shadows and no
 * underline on hover or while the menu is open. Locations come from the host classes.
 */
.gf-promotion-ad-menu .gf-menu__trigger,
.gf-promotion-ad-menu .gf-menu__trigger:hover,
.gf-promotion-ad-menu .gf-menu__trigger.is-open {
  font-size: var(--gf-text-caption);
  line-height: var(--gf-leading-caption);
  text-decoration: none;
  text-underline-offset: 0;
}

/* Hero and gallery marks sit on top of artwork: white copy with the badge's own shadow. */
.gf-promotion-ad-menu.promo-ad-menu--overview .gf-menu__trigger,
.gf-promotion-ad-menu.promo-ad-menu--overview .gf-menu__trigger:hover,
.gf-promotion-ad-menu.promo-ad-menu--overview .gf-menu__trigger.is-open {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.gf-promotion-ad-menu.promo-ad-menu--mini .gf-menu__trigger,
.gf-promotion-ad-menu.promo-ad-menu--mini .gf-menu__trigger:hover,
.gf-promotion-ad-menu.promo-ad-menu--mini .gf-menu__trigger.is-open {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

/* The detail player's mark keeps the top-left corner and takes the carousel arrows' left
   inset (20px), so it lines up with them instead of sitting tighter to the edge. */
.gf-promotion-ad-menu.campaign-ad-menu {
  left: 20px;
}

/* The detail modal's mark stays body-size over the player, matching the old badge. */
.gf-promotion-ad-menu.campaign-ad-menu .gf-menu__trigger,
.gf-promotion-ad-menu.campaign-ad-menu .gf-menu__trigger:hover,
.gf-promotion-ad-menu.campaign-ad-menu .gf-menu__trigger.is-open {
  font-size: var(--gf-text-body);
  line-height: var(--gf-leading-body);
  text-shadow: 0px 4px 8px rgba(16, 24, 40, 0.1), 0px 2px 4px rgba(16, 24, 40, 0.06);
}

/* The sidebar rail's mark sits exactly where the old "Ad" label did, not in the menu button's corner. */
.sidebar-ad-menu.gf-promotion-ad-menu {
  top: 8px;
  left: 8px;
}
