/* Google AdSense units.
 *
 * Real CSS rather than a string inside public/js/ads.js, for two reasons.
 * tests/contrast-test.js reads the stylesheets to check every text colour
 * against its background, and a colour hidden in a JavaScript string is a
 * colour nothing is checking. And the label needs one value in light mode and
 * another in dark: no single grey clears 4.5:1 against both #f7f7f9 and
 * #1b1b20, so the media query has to be real CSS for the rule to exist at all.
 *
 * It ships as part of lib/ads.js's LOADER, so a page that carries ads carries
 * this -- including browse.html and index.html, which do not load
 * css/monzo.css. An ad unit without this file renders as an unlabelled,
 * unbordered block in the job list, which is the exact failure the styling
 * is here to prevent.
 */
.fmj-ad {
  display: block;
  margin: 18px 0;
  padding: 10px 12px;
  background: #f7f7f9;
  border: 1px dashed #d4d4dc;
  border-radius: 10px;
  min-height: 60px;
}

/* #616169 clears WCAG AA (4.5:1) against every background the site uses --
   white, both cream tints and the panel above -- not just the panel. The
   label is what stops an advert reading as a job card, so it is the last
   text on this site that should be hard to see. */
.fmj-ad-label {
  display: block;
  font: 600 11px/1.4 system-ui, -apple-system, sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #616169;
  margin-bottom: 8px;
}

/* In the job grid an advert spans the whole row. One cell would be a job
   card's size and shape, in a line of job cards, on a page where every other
   cell is a thing you click to get a job. */
#ext-grid .fmj-ad { grid-column: 1 / -1; }

/* Dark mode on this site is the body.dark class, toggled by the page -- not
 * the operating system. Keying off the OS setting instead was wrong in both
 * directions: a visitor whose machine is set to dark would have got a
 * near-black advert panel sitting in an otherwise white page, and the four
 * ad-bearing pages that DO have a dark theme (decode, match, negotiate,
 * salary) would have kept a white one when the reader turned the lights off.
 * Eighteen of the twenty-two have no dark theme at all. */
body.dark .fmj-ad { background: #1b1b20; border-color: #3a3a44; }
body.dark .fmj-ad-label { color: #9aa0ad; }
