/* ==========================================================================
   Onflow Ads — social media row (static/social.css)
   --------------------------------------------------------------------------
   One component, every surface: the row of platform links the owner switches
   on in the admin console. It is spliced into every page by the growth layer
   (onflow/social + onflow/growth) and mounted by social.js into whichever
   footer the page has — main.js, lux.js, the bespoke homepage, the Paid
   Promotions shell, the status page, the docs guide — or, on a page with no
   footer at all, drawn as a slim strip at the very end.

   Design rules, in order of importance:
     1. It inherits. Colour and font come from the surface it sits in, so the
        row looks native on a dark footer, a light docs page and inside a
        Telegram in-app browser without being told which one it is on.
     2. It is a guest. Every footer on this site styles `ul` and `a` for its own
        link columns (`.foot ul a`, `.footer__group a` …). The selectors below
        are deliberately heavier than those, and every custom property is
        namespaced `--ofa-…`, so the host cannot restyle the row and the row
        cannot leak into the host (lux.css owns `--ink`; styles.css owns
        `--brand-…`).
     3. It is a target, not a picture. Every link is at least 40px tall (44px
        on a touch screen), has a visible focus ring, an accessible name that
        says where it goes, and a press state instead of a hover state on
        devices that cannot hover.
     4. Brand colour is a reward, not a default. Chips are quiet until you
        hover or press; then they take the platform's colour. X, TikTok and
        Threads are black brands, so their "colour" is an elevation instead —
        a black chip on a black footer would simply vanish. The official
        updates channel is the exception: it wears its colour at rest.
     5. Nothing moves for someone who asked for nothing to move.
   ========================================================================== */

nav.ofa-social {
  --ofa-size: 40px;
  --ofa-gap: 10px;
  --ofa-bg: rgba(127, 127, 127, .14);
  --ofa-line: rgba(127, 127, 127, .28);
  --ofa-brand: #888;
  --ofa-ink: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  max-width: 100%;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  color: inherit;
  text-align: left;
}
nav.ofa-social .ofa-social__lead {
  display: block;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: .62;
}
nav.ofa-social ul.ofa-social__list {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: var(--ofa-gap);
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 100%;
}
nav.ofa-social ul.ofa-social__list > li {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1;
}
nav.ofa-social ul.ofa-social__list > li::before,
nav.ofa-social ul.ofa-social__list > li::marker { content: none; }
nav.ofa-social ul.ofa-social__list a.ofa-social__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-width: var(--ofa-size);
  height: var(--ofa-size);
  margin: 0;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--ofa-bg);
  border: 1px solid var(--ofa-line);
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  opacity: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease,
              transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
nav.ofa-social ul.ofa-social__list a.ofa-social__link--icon { width: var(--ofa-size); padding: 0; }
nav.ofa-social .ofa-social__icon { display: block; width: 18px; height: 18px; flex: 0 0 18px; }
nav.ofa-social .ofa-social__icon svg { display: block; width: 100%; height: 100%; fill: currentColor; }
nav.ofa-social .ofa-social__label { font-size: 13px; font-weight: 600; white-space: nowrap; letter-spacing: .01em; color: inherit; }
.ofa-social__sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* The official updates channel is always a labelled pill and carries its
   colour at rest — it is the one link every surface points people at. */
nav.ofa-social ul.ofa-social__list a.ofa-social__link--updates,
nav.ofa-social ul.ofa-social__list a.ofa-social__link--updates:visited {
  background: var(--ofa-brand);
  border-color: var(--ofa-brand);
  color: var(--ofa-ink);
}
nav.ofa-social ul.ofa-social__list a.ofa-social__link:focus-visible {
  outline: 2px solid var(--ofa-brand);
  outline-offset: 3px;
  border-radius: 999px;
}
nav.ofa-social ul.ofa-social__list a.ofa-social__link:active { transform: scale(.94); }

@media (hover: hover) and (pointer: fine) {
  nav.ofa-social ul.ofa-social__list a.ofa-social__link:hover {
    background: var(--ofa-brand);
    border-color: var(--ofa-brand);
    color: var(--ofa-ink);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -12px var(--ofa-brand);
  }
  nav.ofa-social ul.ofa-social__list a.ofa-social__link--dark:hover {
    background: #0b0c10;
    border-color: rgba(255, 255, 255, .45);
    color: #fff;
    box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .9);
  }
  nav.ofa-social ul.ofa-social__list a.ofa-social__link--updates:hover {
    filter: brightness(1.08);
    box-shadow: 0 12px 26px -12px var(--ofa-brand);
  }
}
@media (pointer: coarse) {
  nav.ofa-social { --ofa-size: 44px; --ofa-gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  nav.ofa-social ul.ofa-social__list a.ofa-social__link { transition: none; }
  nav.ofa-social ul.ofa-social__list a.ofa-social__link:hover,
  nav.ofa-social ul.ofa-social__list a.ofa-social__link:active { transform: none; }
}
/* On a light surface (the docs guide in light mode) the quiet chips need a
   touch more contrast than on the dark site. The site itself is dark-only and
   says so with <meta name="color-scheme" content="dark">: without the :has()
   guard a visitor whose OS is set to light got these dark-on-dark values on
   every marketing page, and the icon chips lost their outline. */
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]):not(:has(meta[name="color-scheme"][content="dark"])) nav.ofa-social { --ofa-bg: rgba(60, 60, 80, .08); --ofa-line: rgba(60, 60, 80, .22); }
}
html[data-theme="light"] nav.ofa-social { --ofa-bg: rgba(60, 60, 80, .08); --ofa-line: rgba(60, 60, 80, .22); }
html[data-theme="dark"] nav.ofa-social { --ofa-bg: rgba(127, 127, 127, .14); --ofa-line: rgba(127, 127, 127, .28); }
@media print {
  nav.ofa-social ul.ofa-social__list a.ofa-social__link { box-shadow: none; transform: none; }
}

/* --- Layout variants ---------------------------------------------------- */
/* strip + centred hosts: lead and chips on one centred line that wraps. */
nav.ofa-social.ofa-social--strip,
.ofa-social-host--center > nav.ofa-social {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 14px;
  text-align: center;
}
nav.ofa-social.ofa-social--strip ul.ofa-social__list,
.ofa-social-host--center > nav.ofa-social ul.ofa-social__list { justify-content: center; }

/* --- Even rows (static/social.js balance()) ------------------------------
   When the chips have to wrap, the official updates chip takes a line to itself
   and the icons underneath are held to equal lines. */
nav.ofa-social ul.ofa-social__list > li.ofa-social__item--row { flex: 0 0 100%; display: flex; }
nav.ofa-social.ofa-social--strip ul.ofa-social__list > li.ofa-social__item--row,
.ofa-social-host--center > nav.ofa-social ul.ofa-social__list > li.ofa-social__item--row { justify-content: center; }

/* --- Where the row sits on each surface --------------------------------- */
/* main.js footer (.footer__brand), lux.js footer (.foot__b), the PP shell,
   the hand-written boost-api footer: under the brand blurb and the bot CTA. */
.footer__social, .foot__social, .pp-footer__social { margin-top: 20px; max-width: 100%; }
.footer__social:empty, .foot__social:empty, .pp-footer__social:empty { display: none; }
/* The status page footer centres everything. */
.sfoot [data-social-slot] { margin: 16px 0 10px; display: flex; justify-content: center; }
.sfoot [data-social-slot]:empty { display: none; }
/* A footer this site did not build (the docs guide's Docusaurus footer): a
   centred row above its copyright block. */
.ofa-social-host--auto { box-sizing: border-box; width: 100%; padding: 6px 16px 22px; display: flex; justify-content: center; }
/* A page with no footer of its own: a slim strip at the very end, safe-area
   aware so it clears a phone's home indicator. */
.ofa-social-strip {
  box-sizing: border-box;
  width: 100%;
  margin: 32px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(127, 127, 127, .28);
  background: transparent;
  color: inherit;
  display: flex;
  justify-content: center;
}
