/* Live Demo CTA — shared across pages with the main header.
   Selectors repeat the class to outrank the per-page inline header rules
   (e.g. `.header-one > div.hidden a:not(.md-header-cta)`), which use !important. */

html body a.md-demo-cta.md-demo-cta.md-demo-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 9px 16px;
  border: 1px solid rgba(53, 133, 188, 0.55);
  border-radius: 8px;
  background: rgba(53, 133, 188, 0.08);
  color: #163070 !important;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

html body a.md-demo-cta.md-demo-cta.md-demo-cta:hover,
html body a.md-demo-cta.md-demo-cta.md-demo-cta:focus-visible {
  background: rgba(53, 133, 188, 0.16);
  border-color: rgba(53, 133, 188, 0.9);
  color: #0f2257 !important;
}

html.dark body a.md-demo-cta.md-demo-cta.md-demo-cta,
body.dark a.md-demo-cta.md-demo-cta.md-demo-cta {
  border-color: rgba(171, 209, 233, 0.6);
  background: rgba(171, 209, 233, 0.1);
  color: #ffffff !important;
}

html.dark body a.md-demo-cta.md-demo-cta.md-demo-cta:hover,
body.dark a.md-demo-cta.md-demo-cta.md-demo-cta:hover {
  background: rgba(171, 209, 233, 0.2);
  border-color: rgba(171, 209, 233, 0.9);
}

/* Mobile sidebar (dark panel): full-width button. */
html body aside a.md-demo-cta.md-demo-cta.md-demo-cta {
  display: flex;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border-color: rgba(171, 209, 233, 0.6);
  background: rgba(171, 209, 233, 0.12);
  color: #ffffff !important;
}

/* Hero variant sits beside the existing .btn-xl buttons. */
html body a.md-demo-cta.md-demo-cta--hero.md-demo-cta--hero {
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 1rem;
}

.md-demo-cta__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: md-demo-cta-pulse 2.2s ease-out infinite;
}

@keyframes md-demo-cta-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .md-demo-cta__dot { animation: none; }
}
