/* ── Header social icon — replaces the old static Kenya flag slot between
   the theme toggle and the hamburger button. Cycles between WhatsApp, X
   and Facebook icons (see header-socials-ui.js); tap opens a small tip
   instead of navigating directly. The swap uses a one-directional 3D
   "reel": perspective on the button, and each face rotates on the Y axis
   (or the X axis on alternating turns — see .axis-x below) — the active
   face turns back and away (is-exiting) while the next face turns in
   from the opposite side (is-active), like a wheel advancing one notch,
   instead of a hard cut. Faces not currently in play sit at rest in the
   same "waiting to enter" position, stacked invisibly. ──────────────── */
#header-social-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  perspective: 220px;
  transition: transform 0.2s ease;
}

#header-social-btn:hover {
  transform: scale(1.15);
}

.header-social-reel {
  position: relative;
  width: 17px;
  height: 17px;
  transform-style: preserve-3d;
}

.header-social-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(90deg);
  opacity: 0;
  transition: transform 1.15s cubic-bezier(0.65, 0, 0.2, 1), opacity 0.85s ease;
}

.header-social-face.is-active {
  transform: rotateY(0deg);
  opacity: 1;
}

.header-social-face.is-exiting {
  transform: rotateY(-90deg);
  opacity: 0;
}

/* Alternate axis — every other turn flips top-to-bottom instead of
   side-to-side, set by header-socials-ui.js before each rotation. */
.header-social-face.axis-x {
  transform: rotateX(90deg);
}

.header-social-face.axis-x.is-active {
  transform: rotateX(0deg);
}

.header-social-face.axis-x.is-exiting {
  transform: rotateX(-90deg);
}

.header-social-icon {
  width: 17px;
  height: 17px;
  object-fit: contain;
  display: block;
  -webkit-user-drag: none;
}

@media (max-width: 480px) {
  #header-social-btn {
    width: 18px;
    height: 18px;
  }

  .header-social-reel {
    width: 14px;
    height: 14px;
  }

  .header-social-icon {
    width: 14px;
    height: 14px;
  }
}

/* ── Tip — small bubble under the icon naming the platform, with a
   link word that opens the real URL. Same fixed-position-on-body
   technique as .motogp-teaser-tip, since #header's z-index:10 creates a
   local stacking context anything nested inside it can't paint above. ── */
.header-social-tip {
  position: fixed;
  width: max-content;
  max-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  text-align: center;
  box-shadow: var(--shadow-float);
  z-index: 6000;
}

.header-social-tip-link {
  display: inline;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
  font-family: inherit;
  margin-left: 3px;
}