/* ============================================================
   PREFERRED SOURCE BUTTON — Rev Boost Funding
   Matches this site's own .btn system (design-system.css:
   Urban Industrial · Charcoal + Safety Orange) rather than
   Google's default widget. See
   ~/.claude/skills/preferred-sources-button for the underlying
   wiring; this file is the site-specific styling only.
   ============================================================ */

/* Specificity note: this site's article.css sets `.art-body a { color:
   var(--orange-500); }` (specificity 0,1,1). Several placements for this
   button (article-bottom, and any future in-body use) live inside
   .art-body, so every rule below is written as `a.preferred-source-btn...`
   (0,1,1 or higher) rather than a bare class, so this component's own
   color always wins regardless of stylesheet load order. */
a.preferred-source-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

/* On dark surfaces (footer, art-hero, closing CTA box — all
   charcoal-800 on this site) — mirrors .btn--outline-white */
a.preferred-source-btn.preferred-source-btn--inv {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.5);
}
a.preferred-source-btn.preferred-source-btn--inv:hover {
  background: var(--white);
  color: var(--charcoal-800);
  border-color: var(--white);
}

/* On white/light surfaces, if ever used there — mirrors .btn--outline */
a.preferred-source-btn.preferred-source-btn--ghost {
  background: transparent;
  color: var(--orange-500);
  border: 2px solid var(--orange-500);
}
a.preferred-source-btn.preferred-source-btn--ghost:hover {
  background: var(--orange-500);
  color: var(--white);
}

/* Solid brand-orange variant, if ever used on a light surface —
   mirrors .btn--orange */
a.preferred-source-btn.preferred-source-btn--solid {
  background: var(--orange-500);
  color: var(--white);
  border: 2px solid var(--orange-500);
}
a.preferred-source-btn.preferred-source-btn--solid:hover {
  background: var(--orange-400);
  border-color: var(--orange-400);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(242, 96, 0, 0.35);
}

/* Small Google-brand-color glow ring on hover/focus, across all
   variants — a subtle nod to what the button does, without
   copying Google's own button design. */
.preferred-source-btn::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--radius) + 3px);
  padding: 2px;
  background: conic-gradient(#4285f4, #ea4335, #fbbc05, #34a853, #4285f4);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.preferred-source-btn:hover::after,
.preferred-source-btn:focus-visible::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .preferred-source-btn::after {
    transition: none;
  }
}
