/* =====================================================================
   Motion — short, purposeful, and fully disabled for prefers-reduced-motion.
   Durations: 120ms (micro), 200ms (default), 320ms (entrance). No looping
   decoration; the only repeating animations are loading indicators.
   ===================================================================== */

@keyframes rp-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes rp-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rp-scale-in {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes rp-slide-in-right {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes rp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@keyframes rp-pop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes rp-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes rp-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Page & section entrance */
.rp-page-enter { animation: rp-fade-in var(--rp-dur-slow) var(--rp-ease-out) both; }
.rp-reveal { animation: rp-fade-up var(--rp-dur-slow) var(--rp-ease-out) both; animation-delay: calc(var(--rp-stagger, 0) * 45ms); }

/* Step panels in the booking flow */
.rp-step-enter { animation: rp-slide-in-right var(--rp-dur-slow) var(--rp-ease-out) both; }

/* Skeleton pulse */
.rp-skeleton { animation: rp-pulse 1.6s ease-in-out infinite; }

/* Modal: gentle scale on open (Bootstrap handles fade) */
.modal.fade .modal-dialog { transform: translateY(8px) scale(0.98); transition: transform var(--rp-dur) var(--rp-ease-out); }
.modal.show .modal-dialog { transform: none; }

/* Dropdown */
.dropdown-menu.show { animation: rp-scale-in var(--rp-dur-fast) var(--rp-ease-out) both; transform-origin: top right; }

/* Toasts */
.rp-toast-region .toast.showing,
.rp-toast-region .toast.show { animation: rp-slide-in-right var(--rp-dur) var(--rp-ease-out) both; }

/* Form validation: invalid fields nudge once on submit */
.rp-shake { animation: rp-shake 240ms var(--rp-ease-in-out) 1; }

/* Selection feedback (slot cards, date cells) */
.rp-selected-pop { animation: rp-pop 260ms var(--rp-ease-out) both; }

/* Success check mark (booking confirmation) */
.rp-check-svg circle { stroke-dasharray: 166; stroke-dashoffset: 166; animation: rp-draw 480ms var(--rp-ease-out) forwards; }
.rp-check-svg path { stroke-dasharray: 48; stroke-dashoffset: 48; animation: rp-draw 320ms var(--rp-ease-out) 380ms forwards; }

/* Status change highlight */
.rp-status-changed { animation: rp-pop 320ms var(--rp-ease-out) both; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .rp-check-svg circle,
  .rp-check-svg path { stroke-dashoffset: 0; }
  .rp-skeleton { opacity: 0.7; }
  .btn:active:not(:disabled),
  .rp-card--interactive:hover { transform: none; }
}
