/*
 * The one primary action on a page (D-107, sheet #8): Add Client, Save, Book, "+ New".
 *
 * `.operion-action` goes on a `btn btn-primary`: it keeps the primary fill, gets a soft primary
 * glow on hover and focus, and pulses once when it first paints so the eye lands on it. Secondary
 * actions stay `btn-label-*`. The pulse is animate.css's `pulse` written out here, so no page needs
 * animate.css for it, and it is skipped entirely under prefers-reduced-motion. Loaded by
 * _Styles.cshtml for every page.
 */
.operion-action {
  position: relative;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
  animation: operion-action-pulse 0.9s ease-in-out 0.3s 1 both;
}

.operion-action:hover,
.operion-action:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.28), 0 0.25rem 0.75rem rgba(var(--bs-primary-rgb), 0.35);
}

.operion-action:focus-visible {
  outline: 2px solid transparent;
}

.operion-action:active {
  transform: translateY(1px);
}

@keyframes operion-action-pulse {
  from {
    transform: scale3d(1, 1, 1);
  }

  50% {
    transform: scale3d(1.05, 1.05, 1.05);
  }

  to {
    transform: scale3d(1, 1, 1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .operion-action {
    animation: none;
    transition: none;
  }

  .operion-action:active {
    transform: none;
  }
}
