/*
 * Healing Icons animations: add a class to any icon (component, <healing-icon>, inline SVG or <img>).
 *
 *   import "healing-icons/animations.css";
 *   <HeartIcon className="hi-beat" />
 *
 * Tune with custom properties on the icon or any parent:
 *   --hi-animation-duration, --hi-animation-delay, --hi-animation-iteration-count, --hi-animation-timing
 * Animations are turned off for people who ask for reduced motion.
 */
.hi-spin,
.hi-spin-reverse,
.hi-pulse,
.hi-beat,
.hi-fade,
.hi-bounce,
.hi-shake,
.hi-wiggle,
.hi-float {
  transform-box: fill-box;
  transform-origin: center;
  animation-delay: var(--hi-animation-delay, 0s);
  animation-duration: var(--hi-animation-duration, 1s);
  animation-iteration-count: var(--hi-animation-iteration-count, infinite);
  animation-timing-function: var(--hi-animation-timing, ease-in-out);
}

/* Loading spinner: a full turn at constant speed. */
.hi-spin {
  animation-name: hi-spin;
  animation-duration: var(--hi-animation-duration, 1.5s);
  animation-timing-function: var(--hi-animation-timing, linear);
}
.hi-spin-reverse {
  animation-name: hi-spin;
  animation-direction: reverse;
  animation-duration: var(--hi-animation-duration, 1.5s);
  animation-timing-function: var(--hi-animation-timing, linear);
}
/* Spins in 8 steps, like a classic loading indicator. */
.hi-pulse {
  animation-name: hi-spin;
  animation-timing-function: var(--hi-animation-timing, steps(8));
}
/* Scales up and back: hearts, notifications. */
.hi-beat {
  animation-name: hi-beat;
}
/* Fades out and in: "working on it". */
.hi-fade {
  animation-name: hi-fade;
  animation-duration: var(--hi-animation-duration, 1.5s);
}
.hi-bounce {
  animation-name: hi-bounce;
  animation-timing-function: var(--hi-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
}
/* Short horizontal shake: errors, wrong password. */
.hi-shake {
  animation-name: hi-shake;
  animation-duration: var(--hi-animation-duration, 0.8s);
}
/* Rocks around its center: a ringing bell. */
.hi-wiggle {
  animation-name: hi-wiggle;
}
.hi-float {
  animation-name: hi-float;
  animation-duration: var(--hi-animation-duration, 2.5s);
}

@keyframes hi-spin {
  to { transform: rotate(360deg); }
}
@keyframes hi-beat {
  0%, 90% { transform: scale(1); }
  45% { transform: scale(var(--hi-beat-scale, 1.25)); }
}
@keyframes hi-fade {
  50% { opacity: var(--hi-fade-opacity, 0.4); }
}
@keyframes hi-bounce {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  10% { transform: translateY(0) scale(1.1, 0.9); }
  30% { transform: translateY(var(--hi-bounce-height, -0.4em)) scale(0.95, 1.05); }
  50% { transform: translateY(0) scale(1.05, 0.95); }
  57% { transform: translateY(-0.08em) scale(1, 1); }
  64% { transform: translateY(0) scale(1, 1); }
}
@keyframes hi-shake {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-10%); }
  30%, 60%, 90% { transform: translateX(10%); }
}
@keyframes hi-wiggle {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30%, 50% { transform: rotate(14deg); }
  20%, 40% { transform: rotate(-14deg); }
}
@keyframes hi-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12%); }
}

@media (prefers-reduced-motion: reduce) {
  .hi-spin,
  .hi-spin-reverse,
  .hi-pulse,
  .hi-beat,
  .hi-fade,
  .hi-bounce,
  .hi-shake,
  .hi-wiggle,
  .hi-float {
    animation: none;
  }
}
