/* ============================================================
   PREFERRED SOURCE BUTTON — matches Round Rock Requisition's own
   .btn system (design-system.css: Hunter Green / Silver) rather
   than Google's default widget. See
   ~/.claude/skills/preferred-sources-button for the underlying
   wiring; this file is the site-specific styling only.
   ============================================================ */

.preferred-source-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--dur-base) var(--ease-out);
  position: relative;
}

/* On dark surfaces (footer / art-hero / art-cta — all brand-700/800/900
   hunter-green backgrounds on this site) — mirrors .btn--ghost-inv */
.preferred-source-btn--inv {
  background: transparent;
  color: var(--color-white);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
}
.preferred-source-btn--inv:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--color-white);
}

/* On light surfaces (art-author-block, background: var(--st-50)) —
   mirrors .btn--ghost */
.preferred-source-btn--ghost {
  background: transparent;
  color: var(--brand-700);
  border: 1.5px solid var(--brand-700);
}
.preferred-source-btn--ghost:hover {
  background: var(--brand-700);
  color: var(--color-white);
}

/* On light surfaces, higher emphasis — mirrors .btn--primary */
.preferred-source-btn--solid {
  background: var(--brand-700);
  color: var(--color-white);
  border: 1.5px solid var(--brand-700);
}
.preferred-source-btn--solid:hover {
  background: var(--brand-800);
  border-color: var(--brand-800);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(27, 48, 34, 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-md) + 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 var(--dur-base) var(--ease-out);
  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;
  }
}
