/* ══════════════════════════════════════════════════════════════════════
   SHARE BUTTON - the footer control that chrome.js injects (share.js owns
   the behaviour). Kept out of style.css so the marketing sheet is not
   touched; token-driven so it matches the footer in any theme.
   ══════════════════════════════════════════════════════════════════════ */

.footer__share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 9px 14px;
  border: 1px solid rgba(184, 169, 255, 0.28);
  border-radius: 999px;
  background: rgba(184, 169, 255, 0.06);
  color: var(--text-soft);
  font: 600 0.66rem/1 "BlueCurve", system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.footer__share svg {
  flex: none;
  width: 14px;
  height: 14px;
}

.footer__share:hover,
.footer__share:focus-visible {
  border-color: rgba(184, 169, 255, 0.62);
  background: rgba(184, 169, 255, 0.15);
  color: var(--text);
  outline: none;
}
.footer__share:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Momentary confirmation: link copied, or handed to the OS share sheet. */
.footer__share.is-done {
  border-color: rgba(134, 239, 172, 0.6);
  background: rgba(134, 239, 172, 0.12);
  color: #86efac;
}

@media (max-width: 760px) {
  .footer__share { min-height: 40px; padding-inline: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .footer__share { transition: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   SHARE POPOVER - what the footer button opens. One panel, same
   destinations the right-click menu lists, so a desktop visitor is not
   limited to copying the link. Positioned by share.js against the button.
   ══════════════════════════════════════════════════════════════════════ */

.share-pop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1400; /* over the footer, matching the menu's panel weight */
  width: max-content;
  max-width: calc(100vw - 16px);
  padding: 10px;
  border: 1px solid rgba(184, 169, 255, 0.26);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(30, 16, 67, 0.98), rgba(16, 7, 42, 0.99));
  box-shadow: 0 22px 54px rgba(4, 2, 16, 0.62), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  animation: share-pop-in 0.14s var(--ease-out, ease-out) both;
}
.share-pop[hidden] { display: none; }

@keyframes share-pop-in {
  from { opacity: 0; transform: translateY(6px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.share-pop__grid {
  display: grid;
  grid-template-columns: repeat(4, 60px);
  gap: 4px;
}

/* Icon over label: seven networks in two tidy rows. */
.share-pop__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px 4px 9px;
  border-radius: 11px;
  color: var(--text-soft);
  text-decoration: none;
  transition: background 0.14s ease, color 0.14s ease;
}
.share-pop__tile svg {
  width: 18px;
  height: 18px;
  fill: none;
  opacity: 0.82;
}
.share-pop__tile span {
  font: 700 0.5rem/1 "BlueCurve", system-ui, sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.share-pop__tile:hover,
.share-pop__tile:focus-visible {
  /* Brand tint from the palette below, so the list reads as logos. */
  background: var(--brand-tint, rgba(184, 169, 255, 0.14));
  color: var(--brand-ink, var(--text));
  outline: none;
}
.share-pop__tile:hover svg,
.share-pop__tile:focus-visible svg { opacity: 1; }
.share-pop__tile:focus-visible { box-shadow: inset 0 0 0 1px rgba(184, 169, 255, 0.55); }

/* Copy link / Share…, separated by a hairline. */
.share-pop__foot {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(184, 169, 255, 0.16);
}

.share-pop__row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  font: 600 0.58rem/1 "BlueCurve", system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.share-pop__row svg {
  flex: none;
  width: 15px;
  height: 15px;
  fill: none;
  opacity: 0.8;
}
.share-pop__row:hover,
.share-pop__row:focus-visible {
  background: rgba(184, 169, 255, 0.14);
  color: var(--text);
  outline: none;
}
.share-pop__row:hover svg,
.share-pop__row:focus-visible svg { opacity: 1; }

@media (max-width: 340px) {
  /* A hair narrower so the panel clears the widest phones edge to edge. */
  .share-pop__grid { grid-template-columns: repeat(4, 54px); }
}

@media (prefers-reduced-motion: reduce) {
  .share-pop { animation: none; }
  .share-pop__tile,
  .share-pop__row { transition: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   NETWORK BRAND PALETTE - one set of tokens for every surface that lists
   the share destinations: the tiles here and the Share rows in
   context-menu.css. The selectors are attribute-only, so a row only needs
   data-network="facebook" to pick up its colours.

   Deliberately a hint of each brand rather than the logo fill: a trace of
   the real colour identifies the network while the panel stays dark and
   the labels keep their contrast.
   ══════════════════════════════════════════════════════════════════════ */

[data-network] {
  --brand-tint: rgba(184, 169, 255, 0.14); /* untinted networks: site accent */
  --brand-ink: var(--text);
}
[data-network="x"]        { --brand-tint: rgba(255, 255, 255, 0.13); --brand-ink: #ffffff; }
[data-network="facebook"] { --brand-tint: rgba(24, 119, 242, 0.20); --brand-ink: #7db2ff; }
[data-network="reddit"]   { --brand-tint: rgba(255, 69, 0, 0.18); --brand-ink: #ff8a5c; }
[data-network="linkedin"] { --brand-tint: rgba(10, 102, 194, 0.24); --brand-ink: #6cb2ff; }
[data-network="whatsapp"] { --brand-tint: rgba(37, 211, 102, 0.15); --brand-ink: #63e6a0; }
[data-network="telegram"] { --brand-tint: rgba(41, 161, 229, 0.20); --brand-ink: #74cbf8; }
[data-network="email"]    { --brand-tint: rgba(184, 169, 255, 0.14); --brand-ink: var(--text); }
