/* The workbench samples and website calls to action share these styles. */
html[data-button-style] :is(.mast, .hero, .footer) .action,
.button-sample {
  background: var(--cta-background);
  background-size: 200% 100%;
  color: var(--cta-text);
  border: 1px solid var(--cta-border);
  border-radius: var(--cta-radius, 12px);
  box-shadow: 0 5px 16px var(--cta-shadow), inset 0 1px 0 #ffffff66;
  animation: cta-pulse var(--cta-duration, 2s) ease-in-out infinite, cta-shimmer 3s ease-in-out infinite;
  transform-origin: center;
  text-shadow: none;
}

html[data-button-style] :is(.mast, .hero, .footer) .action:hover {
  filter: brightness(1.08);
}
html[data-button-style] :is(.mast, .hero, .footer) .action:focus-visible {
  outline: 3px solid var(--cta-border);
  outline-offset: 4px;
}
html[data-button-style] :is(.mast, .footer) .action {
  animation-name: cta-glow, cta-shimmer;
}

html[data-button-style=amber] .action, .button-sample-amber {
  --cta-background: linear-gradient(135deg, #fff0b2, #f7ba47 58%, #ec9425);
  --cta-text: #281400;
  --cta-border: #ffe59b;
  --cta-shadow: #e89b2870;
  --cta-glow: #ffb83ccc;
  --cta-radius: 12px;
}
html[data-button-style=ember] .action, .button-sample-ember {
  --cta-background: linear-gradient(135deg, #8b1421, #b32320 55%, #8c2712);
  --cta-text: #fff;
  --cta-border: #ffb357;
  --cta-shadow: #f85a2866;
  --cta-glow: #ff6728dd;
  --cta-radius: 14px;
  --cta-duration: 1.8s;
}
html[data-button-style=neon] .action, .button-sample-neon {
  --cta-background: linear-gradient(135deg, #45105e, #86115f 58%, #701551);
  --cta-text: #fff;
  --cta-border: #ffb7eb;
  --cta-shadow: #ef47bd77;
  --cta-glow: #ff52d8dd;
  --cta-radius: 10px;
  --cta-duration: 1.8s;
}
html[data-button-style=cobalt] .action, .button-sample-cobalt {
  --cta-background: linear-gradient(125deg, #073a86, #0751a7 55%, #143477);
  --cta-text: #fff;
  --cta-border: #8be8ff;
  --cta-shadow: #168af577;
  --cta-glow: #36c3ffdd;
  --cta-radius: 10px;
  --cta-duration: 1.9s;
}
html[data-button-style=jewel] .action, .button-sample-jewel {
  --cta-background: linear-gradient(135deg, #064b43, #087061 55%, #034b5a);
  --cta-text: #fff;
  --cta-border: #9df7d7;
  --cta-shadow: #16af8766;
  --cta-glow: #2ce4aacc;
  --cta-radius: 999px;
  --cta-duration: 2.1s;
}
html[data-button-style=ice] .action, .button-sample-ice {
  --cta-background: linear-gradient(130deg, #d9f9ff, #90deef 54%, #71c8e9);
  --cta-text: #062e49;
  --cta-border: #f1fdff;
  --cta-shadow: #42b8e977;
  --cta-glow: #78dffff0;
  --cta-radius: 13px;
  --cta-duration: 2.1s;
}
html[data-button-style=violet] .action, .button-sample-violet {
  --cta-background: linear-gradient(135deg, #321049, #5c176d 55%, #391154);
  --cta-text: #fff8e9;
  --cta-border: #f4cb78;
  --cta-shadow: #b178d277;
  --cta-glow: #e7b75bce;
  --cta-radius: 10px;
}
html[data-button-style=spectrum] .action, .button-sample-spectrum {
  --cta-background: linear-gradient(115deg, #51105f, #7d124c 48%, #183e86);
  --cta-text: #fff;
  --cta-border: #f9acee;
  --cta-shadow: #bb4cd477;
  --cta-glow: #ef63e6e0;
  --cta-radius: 999px;
  --cta-duration: 1.9s;
}
html[data-button-style=outline] .action, .button-sample-outline {
  --cta-background: linear-gradient(145deg, #29232c, #17131b 55%, #423024);
  --cta-text: #fff7df;
  --cta-border: #f5ce7c;
  --cta-shadow: #e0a94a66;
  --cta-glow: #ffc85acb;
  --cta-radius: 8px;
  --cta-duration: 2.1s;
}
html[data-button-style=coral] .action, .button-sample-coral {
  --cta-background: linear-gradient(135deg, #8d1740, #a12f35 52%, #86301a);
  --cta-text: #fff;
  --cta-border: #ffc9a4;
  --cta-shadow: #ef765e77;
  --cta-glow: #ff9278df;
  --cta-radius: 999px;
  --cta-duration: 1.8s;
}

@keyframes cta-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 5px 14px var(--cta-shadow), inset 0 1px 0 #ffffff66; }
  50% { transform: scale(1.035); box-shadow: 0 6px 27px var(--cta-glow), 0 0 0 4px var(--cta-shadow), inset 0 1px 0 #ffffff88; }
}
@keyframes cta-glow {
  0%, 100% { box-shadow: 0 4px 12px var(--cta-shadow), inset 0 1px 0 #ffffff66; }
  50% { box-shadow: 0 4px 23px var(--cta-glow), 0 0 0 3px var(--cta-shadow), inset 0 1px 0 #ffffff88; }
}
@keyframes cta-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-button-style] :is(.mast, .hero, .footer) .action,
  .button-sample { animation: none; }
}
