/* CampusConnect micro-interactions: icon swaps and feedback. Menus, modals and the .is-loading button state live in motion.css.
   Timing comes from the motion tokens (tokens.css / motion.css). Everything that moves is behind no-preference. */


@media (prefers-reduced-motion: no-preference) {
  /* ---- Icon swap: the new icon turns in and settles ---- */
  @keyframes mi-swap { 0% { transform: rotate(-90deg) scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
  .mi-swap { display: inline-block; animation: mi-swap var(--dur-base, .28s) var(--ease-spring, cubic-bezier(.34, 1.56, .64, 1)) both; }

  /* ---- Like: the heart pops when it becomes liked ---- */
  @keyframes mi-pop { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
  .engage-btn.liked i { display: inline-block; animation: mi-pop .45s var(--ease-spring, cubic-bezier(.34, 1.56, .64, 1)); }
  .mi-pop { animation: mi-pop .45s var(--ease-spring, cubic-bezier(.34, 1.56, .64, 1)); }

  /* ---- Bell ring on a new notification ---- */
  @keyframes mi-ring {
    0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); }
    45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); }
  }
  .mi-ring i { display: inline-block; transform-origin: 50% 0; animation: mi-ring .9s var(--ease-out, ease-out); }

  /* ---- Pulse ring (download started) ---- */
  @keyframes mi-pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 208, 132, .55); } 100% { box-shadow: 0 0 0 14px rgba(0, 208, 132, 0); } }
  .mi-pulse { animation: mi-pulse .6s var(--ease-out, ease-out); }
}
