a.gift-bell,
button.gift-bell {
  transform-origin: 50% 25%;
}

a.gift-bell:not(.btn, .library-action, .gift-library-link) {
  display: inline-block;
}

a.gift-library-link.gift-bell {
  width: fit-content;
  max-width: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  a.gift-bell,
  button.gift-bell {
    animation: gift-bell-ring 3.8s ease-in-out infinite;
  }

  /* The site theme disables button animations by default. */
  body a.btn.gift-bell,
  body a.library-action.gift-bell {
    animation: gift-bell-ring 3.8s ease-in-out 0.28s infinite !important;
  }

  @keyframes gift-bell-ring {
    0%, 24%, 100% { rotate: 0deg; }
    3% { rotate: 16deg; }
    6% { rotate: -16deg; }
    9% { rotate: 13deg; }
    12% { rotate: -13deg; }
    15% { rotate: 9deg; }
    18% { rotate: -7deg; }
    21% { rotate: 4deg; }
  }
}
