/* ASE Schedule public site: premium primary buttons (2 Dec 2026).
   Buttons covered: .button (aqua theme pages, blog, landing pages), .btn.btn-primary
   (homepage and menu feature pages) and .fd-button (feature detail pages).
   Secondary/outline buttons are untouched. Corners stay square (8px, approved 1 Nov 2026).
   The light buttons on dark closing bands (.comparison-cta, .bl-final-cta) keep their
   colours and only get the hover motion. Nothing changes size: borders keep their width. */

:root {
  --ase-cta-top: #16b5ac;
  --ase-cta-mid: #0a948f;
  --ase-cta-bottom: #06716d;
  --ase-cta-edge: #05605c;
  --ase-cta-glow: rgba(8, 127, 123, 0.42);
  --ase-cta-ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

/* 1. Shared frame and motion for every primary button. */
html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition:
    transform 0.4s var(--ase-cta-ease),
    box-shadow 0.4s var(--ase-cta-ease),
    border-color 0.4s ease !important;
}

/* 2. The teal finish (not for the light buttons on dark bands). */
html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button):not(:is(.comparison-cta, .bl-final-cta) *) {
  border-color: var(--ase-cta-edge) !important;
  background: linear-gradient(180deg, var(--ase-cta-top) 0%, var(--ase-cta-mid) 55%, var(--ase-cta-bottom) 100%) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 0 rgba(3, 58, 55, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -2px 0 rgba(3, 66, 63, 0.2),
    0 1px 2px rgba(4, 50, 48, 0.22),
    0 10px 22px -10px var(--ase-cta-glow) !important;
}

/* Soft top light that fades in on hover. */
html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 95% at 50% 0%, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 62%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* Light sweep that crosses the button once per hover. */
html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button)::before {
  content: "";
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: -55%;
  width: 42%;
  z-index: -1;
  background: linear-gradient(100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.08) 30%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0.08) 70%,
    rgba(255, 255, 255, 0) 100%);
  transform: translateX(0) skewX(-20deg);
  opacity: 0;
  pointer-events: none;
}

/* On the light buttons the sweep is a faint teal so it can be seen. */
html body :is(.comparison-cta, .bl-final-cta) .button:not(.secondary)::before {
  background: linear-gradient(100deg,
    rgba(10, 148, 143, 0) 0%,
    rgba(10, 148, 143, 0.06) 30%,
    rgba(10, 148, 143, 0.22) 50%,
    rgba(10, 148, 143, 0.06) 70%,
    rgba(10, 148, 143, 0) 100%);
}

/* The small arrow some buttons carry moves toward where it points. */
html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button) > span[aria-hidden="true"] {
  display: inline-block;
  transition: transform 0.4s var(--ase-cta-ease);
}

@media (hover: hover) and (pointer: fine) {
  html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button):hover {
    transform: translateY(-2px) !important;
  }

  html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button):not(:is(.comparison-cta, .bl-final-cta) *):hover {
    border-color: #045955 !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.4),
      inset 0 -2px 0 rgba(3, 66, 63, 0.2),
      0 2px 4px rgba(4, 50, 48, 0.16),
      0 18px 34px -12px rgba(8, 127, 123, 0.6) !important;
  }

  html body :is(.comparison-cta, .bl-final-cta) .button:not(.secondary):hover {
    box-shadow: 0 16px 32px -14px rgba(0, 0, 0, 0.55) !important;
  }

  html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button):hover::after {
    opacity: 1;
  }

  html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button):hover::before {
    animation: ase-cta-sheen 0.9s cubic-bezier(0.45, 0, 0.25, 1) 1 both;
  }

  html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button):hover > span[aria-hidden="true"] {
    transform: translate(2px, -2px);
  }
}

html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button):active {
  transform: translateY(0) scale(0.985) !important;
  transition-duration: 0.12s !important;
}

html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button):not(:is(.comparison-cta, .bl-final-cta) *):active {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 2px 6px rgba(3, 58, 55, 0.28),
    0 1px 2px rgba(4, 50, 48, 0.2) !important;
}

html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button):focus-visible {
  outline: 2px solid #0a948f;
  outline-offset: 3px;
}

html body :is(.comparison-cta, .bl-final-cta) .button:not(.secondary):focus-visible {
  outline-color: #b6ede0;
}

@keyframes ase-cta-sheen {
  0% { transform: translateX(0) skewX(-20deg); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateX(400%) skewX(-20deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button),
  html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button):hover,
  html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button):active {
    transform: none !important;
  }

  html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button):hover::before {
    animation: none;
  }

  html body :is(.button:not(.secondary), .btn.btn-primary, .fd-button) > span[aria-hidden="true"] {
    transform: none !important;
  }
}
