
/* NWMC announcement banner. One markup pattern, four layouts.
 *
 * Colors come from the Colors screen and are set as custom properties in each
 * banner's style attribute (NWMC_Banner_Colors::style_vars()), so a color
 * added later works on pages already sitting in a host's cache. The values
 * below are only a fallback.
 *
 * The banner uses the site's own font.
 */
.nwmc-banner {
  --nwmc-ground: #1F2329; --nwmc-ink: #FFFFFF; --nwmc-badge: #FFFFFF; --nwmc-mark: #1F2329;
  --nwmc-btn-bg: #FFFFFF; --nwmc-btn-ink: #1F2329; --nwmc-link: #FFFFFF;
  position: relative;
  background: var(--nwmc-ground);
  color: var(--nwmc-ink);
  font-family: inherit;
}
.nwmc-banner, .nwmc-banner * { box-sizing: border-box; }
.nwmc-banner[hidden] { display: none; }
/* Theme heading and paragraph colors would otherwise win inside the banner. */
.nwmc-banner p, .nwmc-banner strong { color: inherit; }

/* Shared pieces, desktop first */
.nwmc-banner__inner { display: flex; align-items: center; gap: 20px; max-width: 1440px; min-height: 120px; margin: 0 auto; padding: 16px 118px; }
.nwmc-banner__badge { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--nwmc-badge); color: var(--nwmc-mark); }
.nwmc-banner__badge svg { width: 30px; height: 30px; }
.nwmc-banner__icon { flex-shrink: 0; width: 48px; height: 48px; }
.nwmc-banner__text { display: flex; flex-direction: column; flex-grow: 1; gap: 4px; min-width: 0; }
/* Headline size comes from Announcement Banner, Settings (Small, Base, Large),
   set per banner as --nwmc-head-size. Each is a clamp() that scales from phone
   to desktop, so there is no separate phone size. The strip overrides it. */
.nwmc-banner__headline { margin: 0; font-size: var(--nwmc-head-size, clamp(20px, 17.18px + 0.751vw, 28px)); line-height: 1.3; font-weight: 600; letter-spacing: 0; text-wrap: pretty; }
.nwmc-banner__headline strong { font-weight: 700; }
.nwmc-banner__detail { margin: 0; font-size: 18px; line-height: 26px; font-weight: 400; text-wrap: pretty; }
.nwmc-banner__cta { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; height: 56px; padding: 0 34px; border-radius: 50px; background: var(--nwmc-btn-bg); color: var(--nwmc-btn-ink); font-size: 18px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; }
/* Restate the color on hover: the theme's a:hover outranks .nwmc-banner__cta and turns the text link-blue */
.nwmc-banner__cta:hover { color: var(--nwmc-btn-ink); text-decoration: underline; text-underline-offset: 3px; }
.nwmc-banner__close { position: absolute; top: 50%; right: 24px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--nwmc-ink); cursor: pointer; }
.nwmc-banner__close svg { width: 22px; height: 22px; }
.nwmc-banner__close:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
.nwmc-banner a:focus-visible, .nwmc-banner__close:focus-visible { outline: 3px solid var(--nwmc-ink); outline-offset: 3px; }

/* Layout 2: large, icon on its own */
.nwmc-banner--large-icon .nwmc-banner__inner { gap: 24px; }
.nwmc-banner--large-icon .nwmc-banner__icon { stroke-width: 1.75; }

/* Layout 3: large statement (no icon, no second line) */
.nwmc-banner--statement .nwmc-banner__inner { justify-content: space-between; }
.nwmc-banner--statement .nwmc-banner__text { flex-grow: 0; max-width: 720px; }

/* Layout 4: small strip (the button becomes a text link) */
.nwmc-banner--strip .nwmc-banner__inner { justify-content: center; gap: 10px; min-height: 48px; padding-top: 12px; padding-bottom: 12px; }
.nwmc-banner--strip .nwmc-banner__icon { width: 22px; height: 22px; }
.nwmc-banner--strip .nwmc-banner__text { display: block; flex-grow: 0; }
.nwmc-banner--strip .nwmc-banner__headline { font-size: 16px; line-height: 24px; font-weight: 400; letter-spacing: 0; }
.nwmc-banner--strip .nwmc-banner__cta { display: inline; height: auto; margin-left: 4px; padding: 0; border-radius: 0; background: none; color: var(--nwmc-link); font-size: 16px; line-height: 24px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.nwmc-banner--strip .nwmc-banner__cta:hover { color: var(--nwmc-link); }
.nwmc-banner--strip .nwmc-banner__close svg { width: 18px; height: 18px; }

/* Narrower desktop and tablet: keep clear of the close button */
@media (max-width: 1279px) {
  .nwmc-banner__inner { padding-left: 32px; padding-right: 88px; }
}

/* Phone */
@media (max-width: 767px) {
  .nwmc-banner__inner { flex-direction: column; align-items: stretch; gap: 16px; min-height: 0; padding: 20px 20px 24px; }
  .nwmc-banner__badge { width: 48px; height: 48px; }
  .nwmc-banner__badge svg { width: 24px; height: 24px; }
  .nwmc-banner__icon { width: 36px; height: 36px; }
  .nwmc-banner__text { padding-right: 8px; }
  .nwmc-banner__headline { text-wrap: balance; }
  .nwmc-banner--large-icon .nwmc-banner__headline strong { display: block; }
  .nwmc-banner__detail { font-size: 16px; line-height: 24px; }
  .nwmc-banner__cta { width: 100%; height: auto; min-height: 52px; padding: 12px 20px; font-size: 17px; white-space: normal; text-align: center; }
  .nwmc-banner__close { top: 12px; right: 12px; margin-top: 0; }
  .nwmc-banner__close svg { width: 20px; height: 20px; }
  .nwmc-banner--statement .nwmc-banner__inner { gap: 20px; }
  .nwmc-banner--statement .nwmc-banner__text { max-width: none; padding-right: 36px; }
  .nwmc-banner--strip .nwmc-banner__inner { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; row-gap: 0; align-items: start; min-height: 104px; padding: 14px 56px 14px 16px; }
  .nwmc-banner--strip.nwmc-banner--no-icon .nwmc-banner__inner { grid-template-columns: minmax(0, 1fr); }
  .nwmc-banner--strip .nwmc-banner__icon { grid-row: span 2; margin-top: 1px; }
  .nwmc-banner--strip .nwmc-banner__headline strong { display: block; }
  .nwmc-banner--strip .nwmc-banner__cta { display: inline-block; justify-self: start; width: auto; min-height: 0; margin: 0; padding: 0; text-align: left; }
  .nwmc-banner--strip .nwmc-banner__close { top: 6px; right: 6px; }
  .nwmc-banner--strip .nwmc-banner__close svg { width: 18px; height: 18px; }
}
