/*
 * Bricks compatibility for the original Access Network stylesheets.
 * The original page was: <body><div wrapper> ubar, header, sections, footer </div></body>.
 * Bricks renders: <body> <header#brx-header> <main#brx-content> <footer#brx-footer>.
 * These rules recreate the original wrapper so the design renders identically.
 */

/* The original page wrapper's typography and clipping now live on <body>. */
body.hn-site {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  color: #20242B;
  background: #FFFFFF;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}

/* Let the sticky .hdr stick to the page, not to Bricks' header wrapper. */
body.hn-site #brx-header { display: contents; }

/* Original sections were plain blocks; Bricks sections default to centred flex columns. */
body.hn-site .brxe-section.hn-s { display: block; width: auto; }

/*
 * Browser defaults inside the imported Access Network sections, header and footer.
 * Bricks' base stylesheet (in its own cascade layer) restyles plain tags site-wide —
 * blockquote borders/Georgia, centred figcaptions, heading sizes, paragraph margins,
 * inline-flex links. The original design was built on the browser's defaults, so this
 * layer restores them. Order of precedence:
 *   Bricks base layer  <  this layer  <  original CSS (unlayered)  <  Bricks editor settings
 * Content your client adds outside these sections keeps normal Bricks styling.
 */
@layer hn-ua {
  :where(.hn-s, #brx-header, #brx-footer) :where(h1) { font-size: 2em; margin: .67em 0; line-height: inherit; text-rendering: auto; }
  :where(.hn-s, #brx-header, #brx-footer) :where(h2) { font-size: 1.5em; margin: .83em 0; line-height: inherit; text-rendering: auto; }
  :where(.hn-s, #brx-header, #brx-footer) :where(h3) { font-size: 1.17em; margin: 1em 0; line-height: inherit; text-rendering: auto; }
  :where(.hn-s, #brx-header, #brx-footer) :where(h4) { font-size: 1em; margin: 1.33em 0; line-height: inherit; text-rendering: auto; }
  :where(.hn-s, #brx-header, #brx-footer) :where(p) { margin: 1em 0; }
  :where(.hn-s, #brx-header, #brx-footer) :where(blockquote) {
    margin: 1em 40px; padding: 0; border: 0; position: static;
    font-family: inherit; font-size: inherit;
  }
  :where(.hn-s, #brx-header, #brx-footer) :where(figcaption) { margin: 0; font-size: inherit; text-align: inherit; color: inherit; }
  :where(.hn-s, #brx-header, #brx-footer) :where(img) { max-width: none; vertical-align: baseline; }
  :where(.hn-s, #brx-header, #brx-footer) :where(svg) { min-width: 0; min-height: 0; }
  :where(.hn-s, #brx-header, #brx-footer) :where(.brxe-text-link) { display: inline; gap: normal; }
  /* Bricks caps every element at max-width:100% and recolours borders; the original did neither. */
  :where(.hn-s, #brx-header, #brx-footer) :where([class*="brxe-"]) { max-width: none; }
  :where(.hn-s, #brx-header, #brx-footer) :where(*) { border-color: currentColor; }
}

/* Loops repeat one template, so the alternating green rows/cards move to :nth-child. */
.evs-list > .ev:nth-child(2n) .ev-date { background: #029F52; }
.evs-list > .ev:nth-child(2n) .ev-type { color: #027A40; background: #E8F6EF; }
.pts-grid > .ptc:nth-child(2n)::before { background: #029F52; }
.pts-grid > .ptc:nth-child(2n) .ptc-ico { background: #E8F6EF; color: #027A40; }
/* "To be confirmed" badge disappears when the date is confirmed (tag renders empty). */
.ev-tbc:empty { display: none; }
/* Partner icons: every card carries all four; show the one matching the card's type. */
.ptc .ptc-ico > svg { display: none; }
.ptc[data-slug="government"] .pi-government,
.ptc[data-slug="academe"] .pi-academe,
.ptc[data-slug="private-sector"] .pi-private-sector,
.ptc[data-slug="csos-global-networks"] .pi-csos-global-networks,
.ptc:not([data-slug="government"]):not([data-slug="academe"]):not([data-slug="private-sector"]):not([data-slug="csos-global-networks"]) .pi-csos-global-networks { display: block; }
