/*
  preferred-source.css
  Styling for the "Add as Preferred Source" button, wired to Google's real
  Preferred Sources API (see /assets/js/preferred-source.js). Two variants,
  built from this site's own design tokens (not Google's default styling):

  .psrc-btn--fill    filled/primary treatment, matches .btn-primary
                     (green-to-gold gradient fill, white text) — for use on
                     light-ish or already-dark footer areas where a strong
                     filled CTA reads well.
  .psrc-btn--inverse  light/inverse treatment, matches .btn-secondary
                     (transparent, silver-bright text, light border, gold on
                     hover) — for the dark byline / end-of-article CTA
                     placements (#0D1F12 page background, --charcoal-800
                     CTA blocks).

  Design tokens mirrored from the site's inline :root{} (see any article's
  <head> or index.html):
    --sg   #1B3022  deep forest green (primary)
    --sgm  #264D30  mid green
    --sgl  #2E5E3A  light green
    --ga   #B8963E  gold accent
    --gl   #D4AF5E  light gold
    --ss   #C0C0C0  silver
    --ssb  #E8E8E8  silver bright
    --gbd  rgba(192,192,192,.18)  glass border
    --fb   'Inter', system-ui, sans-serif
*/

.psrc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--fb, 'Inter', system-ui, sans-serif);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  padding: 0.75em 1.4em;
  border-radius: 8px;
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.psrc-btn__icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

/* --- Filled / primary variant (matches .btn-primary) --- */
.psrc-btn--fill {
  background: linear-gradient(135deg, #264D30 0%, #B8963E 100%);
  color: #fff;
  border: none;
}
.psrc-btn--fill:hover {
  box-shadow: 0 8px 30px rgba(184, 150, 62, 0.35);
  transform: translateY(-2px);
  color: #fff;
}
.psrc-btn--fill:active { transform: translateY(0); }

/* --- Light / inverse variant (matches .btn-secondary) --- */
.psrc-btn--inverse {
  background: transparent;
  color: #E8E8E8;
  border: 1px solid rgba(192, 192, 192, 0.18);
}
.psrc-btn--inverse:hover {
  border-color: #B8963E;
  color: #D4AF5E;
  background: rgba(184, 150, 62, 0.06);
}
.psrc-btn--inverse:active { transform: translateY(0); }

/* Subtle Google four-color hover accent — a thin conic-gradient ring that
   fades in behind the button on hover, referencing Google's own brand
   colors without copying Google's actual button design. */
.psrc-btn::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 10px;
  padding: 2px;
  background: conic-gradient(from 180deg, #4285F4, #EA4335, #FBBC05, #34A853, #4285F4);
  opacity: 0;
  transition: opacity 0.25s ease;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.psrc-btn:hover::before { opacity: 0.55; }

@media (prefers-reduced-motion: reduce) {
  .psrc-btn,
  .psrc-btn::before { transition: none; }
  .psrc-btn--fill:hover { transform: none; }
}
