/* Inline icons (wibn_icon) — several glyphs (online, phone, user, globe…) are a
   circle drawn edge-to-edge in their viewBox, so the browser's default SVG clip
   shaves the antialiased rim at fractional pixel sizes (looks flat-sided, snaps
   crisp on zoom). Letting the rim paint fixes it. Keyed off the focusable="false"
   every wibn_icon() emits, so the Leaflet map's SVG panes keep their own clip. */

svg[focusable="false"] {
  overflow: visible;
}

/* Leaflet maps (in-person map + event venue map): leaflet.css 1.9.4 blends
   tiles with plus-lighter to hide hairline gaps, but where the map sits at a
   fractional pixel position neighbouring tiles overlap and the overlap is
   painted twice — bright lines along the tile seams. Normal blending leaves
   at most a faint seam. Three classes, so it out-ranks leaflet.css's rule. */
.leaflet-container .leaflet-tile-pane img.leaflet-tile {
  mix-blend-mode: normal;
}

/* The map tiles at about a third of their colour: OpenStreetMap draws main
   roads pink and red, which competed with the brand-pink pins. Faded (not
   grey — full greyscale read as drab), sea and hills still read at a glance.
   Only the tiles — pins, the radius circle and the controls sit in other
   panes and keep their colour. */
.leaflet-container .leaflet-tile-pane {
  filter: saturate(0.35);
}

/* The tiles' required credit: the text colour, not leaflet.css's blue (two
   classes + an element, so it out-ranks `.leaflet-container a`). */
.leaflet-container .leaflet-control-attribution a {
  color: var(--text-color);
}

/* Icon treatments — a bare wibn_icon() glyph wrapped in a circle by CSS.
   The glyph must paint with currentColor (sanitised glyphs carry
   fill="currentColor"), so a single `color` on the icon — or any ancestor —
   drives the glyph, the ring and the 20% tint together. .icon-rev flips the
   glyph out to the page background and fills the disc with the colour instead.

   Applied straight onto the <svg> via wibn_icon($name, 'icon-ol'|'icon-bkg'|'icon-rev').
   Tune per instance with the --icon-* custom properties (size / glyph inset / ring).

   The glyph is inset from the disc edge by SCALING it around the viewBox centre
   (--icon-glyph = the fraction of the disc it fills) — NOT by padding the <svg>.
   CSS padding on an <svg> is positioned inconsistently across browsers (Firefox
   shifts the viewBox into the padding box, pushing the glyph up/left), whereas a
   transform with transform-box:view-box is centre-anchored identically everywhere. */

.icon-ol,
.icon-bkg,
.icon-rev {
  --icon-size: 2.5rem;
  --icon-glyph: 0.66;
  --icon-ring: var(--border-width-lg);
  box-sizing: border-box;
  width: var(--icon-size);
  height: var(--icon-size);
  border-radius: 50%;
  overflow: hidden;
  vertical-align: middle;
}

/* Inset the glyph: scale it down about the viewBox centre (= the disc centre),
   so the disc stays full-bleed and the mark sits centred in it, cross-browser. */
.icon-ol > *,
.icon-bkg > *,
.icon-rev > * {
  transform: scale(var(--icon-glyph));
  transform-origin: center;
  transform-box: view-box;
}

/* Outlined: ring + glyph in the current colour, no fill. */
.icon-ol {
  border: var(--icon-ring) solid currentColor;
}

/* 20% background: glyph in the current colour on a 20%-strength tint disc. */
.icon-bkg {
  background-color: color-mix(in srgb, currentColor 20%, transparent);
}

/* Reversed: solid disc in the current colour, glyph knocked out to the page bg.
   The CSS `fill` beats the glyph's fill="currentColor" presentation attribute. */
.icon-rev {
  background-color: currentColor;
  fill: var(--background-color);
}

/* Icon circle — filled disc with a centred icon (profile links, submenu toggle, …) */

.icon-circle {
  display: inline-block;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.1rem;
  transition: transform var(--duration) var(--ease);
}

/* Avatar — one fixed size (95px) at every width for member cards and the
   contact person; smaller and larger contexts override the size only. The ring
   is the same 2px (--border-width-lg) at every size, like the outline icon disc. */

.initials {
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  border: var(--border-width-lg) solid var(--primary-color);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Heading font + weight (Heebo 600), so the initials match the name beside them. */
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: var(--section-title-fs);
}

.avatar {
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  overflow: hidden;
  /* Image avatars: keep the ring width so sizing matches .initials, but
     transparent so there's no pink ring around a real photo. */
  border: var(--border-width-lg) solid transparent;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Pill — a solid tag for a meeting type (In Person / Online / Special Event …).
   In Person is pink; .pill--other (every other type) is purple. White text on
   both passes AA at this size. A row of pills goes in .pills. */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  border: var(--border-width-sm) solid var(--primary-color);
  border-radius: var(--br-rounded);
  background-color: var(--primary-color);
  color: var(--white);
  font-size: var(--font-xs);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--label-letter-spacing);
  text-transform: uppercase;
  white-space: nowrap;
}

.pill--other {
  border-color: var(--secondary-color);
  background-color: var(--secondary-color);
}

.pills li {
  margin: 0;
}

/* Pagination
   Two sources share this: the pagination.php partial (members, meetings) emits
   <a>/<a.is-active>/<span.pagination__ellipsis>; the news archive uses WordPress's
   the_posts_pagination(), which emits .nav-links > a.page-numbers /
   span.page-numbers.current / span.page-numbers.dots. Both get the same boxes —
   in particular the CURRENT page is a span there, not an <a>, so it needs its own
   selector or it falls out of the row unstyled. */

.pagination,
.pagination .nav-links {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.pagination {
  margin-top: var(--space-md);
}

.pagination a,
.pagination .page-numbers.current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 2.25rem;
  height: 2.25rem;
  padding-inline: 0.5rem; /* two-digit page numbers don't crowd the border */
  border-radius: var(--br-sm);
  border: 1px solid var(--grey-50);
  color: var(--grey-80);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}

.pagination a:hover {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  text-decoration: none;
}

.pagination a.is-active,
.pagination .page-numbers.current {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.pagination__ellipsis,
.pagination .page-numbers.dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  color: var(--grey-80);
  font-weight: 700;
}

/* Category filter — reuses the .button.small component (buttons.css), matching
   the map result-card action buttons. Only layout + active state live here. */

.category-filter ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.category-filter li {
  margin: 0;
}

/* Current category: solid brand fill, non-clickable. */
.category-filter .is-active a {
  background: var(--primary-color);
  color: var(--white);
  pointer-events: none;
}

/* Search results */

.search-results-group + .search-results-group,
.search-results-group ul {
  margin-top: var(--space-sm-md-t);
}

/* search filter */

.search-filter {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  margin-bottom: var(--space-md);
}

@media (min-width: 62rem) {
  .search-filter {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .posts-search {
    width: 100%;
  }
}

/* Alert — a tinted block with a coloured accent edge, for a state the user has
   to notice (refusal, confirmation, caution). Colour comes from --alert-color /
   --alert-bg, set per modifier. `.booking-eligibility` is the booking form's
   live eligibility refusal (booking-modal.js) and is an error alert. */
.alert,
.booking-eligibility {
  margin: var(--space-sm) 0 0;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-sm);
  line-height: 1.4;
  color: var(--alert-color);
  background: var(--alert-bg);
  border: 1px solid var(--alert-color);
  border-left-width: 3px;
  border-radius: var(--br-sm);
}

.alert--error,
.booking-eligibility {
  --alert-color: var(--error-color);
  --alert-bg: var(--error-10);
}

.alert--success {
  --alert-color: var(--success-color);
  --alert-bg: var(--success-10);
}

.alert--warning {
  --alert-color: var(--warning-color);
  --alert-bg: var(--warning-10);
}

/* Link cue — the small pink "View profile" link: an arrow-cta glyph in an
   .icon-bkg tint disc, then the label. Markup:
   <a|span class="link-cue">wibn_icon('arrow-cta', 'icon-bkg')<span>Label</span></a>
   Used by the Team / Associates cards, the group leader/owner cards and the
   in-person map's list link. The disc deepens 20% → 30% on the link's own
   hover / focus; a component whose cue answers another trigger (the whole
   card, the name link) sets `--link-cue-tint: 30%` on the cue itself. */
.link-cue {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-sm);
  color: var(--primary-color);
}

/* Two classes, so it out-ranks typography.css's a:hover / :focus-visible underline. */
a.link-cue,
a.link-cue:is(:hover, :focus-visible) {
  text-decoration: none;
}

a.link-cue:is(:hover, :focus-visible) {
  --link-cue-tint: 30%;
}

.link-cue .icon-bkg {
  --icon-size: var(--row-icon-size);
  flex-shrink: 0;
  background-color: color-mix(in srgb, currentColor var(--link-cue-tint, 20%), transparent);
  transition: background-color var(--duration-fast) var(--ease);
}

/* Icon row — the glyph-then-label row shared by the fact cards (event / member /
   group Venues), the info cards (group events, map results) and the group card
   stats. One place owns the alignment: the row is top-aligned and the icon sits
   in a one-line-tall box (1lh), so the glyph stays centred on the FIRST line of a
   label that wraps. Gap + glyph size come from --row-gap / --row-icon-size.
   Markup: <p|li class="icon-row"><span class="icon-row__icon">…</span><span>text</span></p> */
.icon-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.icon-row {
  display: flex;
  align-items: flex-start;
  gap: var(--row-gap);
  margin: 0;
  color: var(--text-color);
}

/* Small text — form hints and the info card's detail row only. Other card rows
   are body size. */
.icon-row--sm {
  font-size: var(--font-sm);
}

.icon-row__icon {
  display: inline-flex;
  align-items: center;
  height: 1lh;
  flex-shrink: 0;
}

.icon-row__icon svg {
  width: var(--row-icon-size);
  height: var(--row-icon-size);
  fill: var(--primary-color);
}

/* A label that is a link reads --text-color and bold — no underline or resize on
   hover — so it signals "clickable" without the default link look. */
.icon-row a {
  color: inherit;
  font-weight: 700;
}

.icon-row a:hover,
.icon-row a:focus {
  text-decoration: none;
}

/* Two-line label: a name over a smaller address (venues). */
.icon-row__title {
  display: block;
  /* Regular weight — it's a label, not a link. */
  font-weight: 400;
}

.icon-row__sub {
  display: block;
  font-size: var(--font-sm);
  color: var(--grey-70);
}

/* Prose under a row title (fact-card.php `body`, e.g. the event venue's
   "Getting there"): paragraphs keep the card's --space-sm rhythm, and links
   inside it are ordinary prose links, not the bold whole-row link above. */
.icon-row__sub.rich-text > * + * {
  margin-top: var(--space-sm);
}

.icon-row .rich-text a {
  color: var(--primary-color);
  font-weight: inherit;
}

.icon-row .rich-text a:hover,
.icon-row .rich-text a:focus {
  text-decoration-line: underline;
}


/* Sticky bar — a pink bar fixed to the bottom of the screen on mobile/tablet
   (below 62rem; desktop never shows it). Hidden until sticky-bar.js adds
   .is-visible, which it does only while none of the elements listed in the
   bar's data-sticky-hide-while (nor the footer) is on screen. Used by the event
   booking bar (template-event.php) and the Large CTA's "check your area" bar
   (section-large-cta.php, with --button-only). Markup:
   .sticky-bar > .sticky-bar__inner.container > text + .cta-button.white
   The pink lives on ::before, NOT on .sticky-bar itself — read the note there
   before giving a bar (or a new variant) a background of its own. */
.sticky-bar {
  display: none;
}

@media (max-width: 61.99rem) {
  .sticky-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    /* Below the sticky header / mobile drawer (z-index 9999+), above content. */
    z-index: 500;
    padding-block: var(--space-sm);
    padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom));
    transform: translateY(100%);
    visibility: hidden;
    transition: transform var(--duration) var(--ease), visibility var(--duration) var(--ease);
  }

  /* The pink is painted on a layer inside the bar, not on the bar itself:
     iOS 26 Safari tints its toolbar area with the background of a fixed
     element touching the bottom edge, which showed as a tall pink strip under
     the button once the toolbar shrank. It only reads the fixed element's own
     background, so this keeps the toolbar the page colour (checked on an
     iPhone, Oct 2026). z-index -1 stays inside the bar's stacking context
     (fixed + z-index), under its content. */
  .sticky-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--primary-color);
    box-shadow: var(--shadow-up);
  }

  .sticky-bar.is-visible {
    transform: translateY(0);
    visibility: visible;
  }

  /* Text and button share one row while both fit on one line; otherwise the
     button wraps under the text (flex lines are filled at the items' one-line
     widths, so it wraps before the text squeezes onto two lines). Three
     classes: out-ranks page-level container rules that load later (e.g.
     event.css's `.event-page .container { flex-direction: column }`). */
  .sticky-bar .container.sticky-bar__inner {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    gap: var(--space-sm);
  }

  .sticky-bar__text {
    flex: 1 1 auto;
    margin: 0;
    color: var(--white);
    font-size: var(--h4-h5-fs);
  }

  .sticky-bar__icon {
    display: inline-flex;
    flex-shrink: 0;
  }

  .sticky-bar__icon svg {
    width: 1.4rem;
    height: 1.4rem;
    fill: var(--white);
  }

  /* Auto side margins centre the button whenever it's alone on a row — wrapped
     under the text, an event bar with no price, or --button-only on phones.
     Beside the text they come to 0 (the text grows to fill the row), so it
     sits on the right. align-self undoes .cta-button's flex-start, which
     pinned it to the top of the row when the text ran to two lines. */
  .sticky-bar .cta-button {
    flex-shrink: 0;
    align-self: center;
    margin-inline: auto;
  }
}

/* .sticky-bar--button-only (the Large CTA bar): phones show just the button —
   the text line made the bar too tall there. The event bar keeps its price. */
@media (max-width: 47.99rem) {
  .sticky-bar--button-only .sticky-bar__text {
    display: none;
  }
}

/* Cookie banner (inc/template-parts/cookie-banner.php, cookie-consent.js) — a
   white card floating over the bottom of the screen until the visitor accepts
   or rejects Google Analytics. Inset from the edges, never touching the bottom
   (see the .sticky-bar note on iOS Safari's toolbar tint). Above the sticky
   bar (500), below the header / drawer (9999+). Accept and Reject share one
   button style: declining must be as easy as accepting. */
.cookie-banner {
  position: fixed;
  left: var(--space-sm);
  right: var(--space-sm);
  bottom: calc(var(--space-sm) + env(safe-area-inset-bottom));
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: var(--form-width);
  margin-inline: auto;
  padding: var(--space-md);
  background: var(--white);
  border-radius: var(--br-md);
  box-shadow: var(--shadow-hover);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__title,
.cookie-banner__text {
  margin: 0;
}

.cookie-banner__text {
  font-size: var(--font-sm);
}

.cookie-banner__actions {
  display: flex;
  gap: var(--space-sm);
}

.cookie-banner__actions .button {
  flex: 1 1 0;
}

@media (min-width: 48rem) {
  .cookie-banner__actions .button {
    flex: 0 0 auto;
  }
}
