/* ClinicOS Animation System */

/* ---- KEYFRAMES ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(30,111,217,0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(30,111,217,0); }
}
@keyframes shimmer {
  from { background-position: -400px 0; }
  to   { background-position: 400px 0; }
}
@keyframes countUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* ---- UTILITY ANIMATION CLASSES ---- */
.animate-fade-up   { animation: fadeInUp 0.55s ease both; }
.animate-fade-left { animation: fadeInLeft 0.55s ease both; }
.animate-fade-right{ animation: fadeInRight 0.55s ease both; }
.animate-fade      { animation: fadeIn 0.4s ease both; }
.animate-scale     { animation: scaleIn 0.4s ease both; }
.animate-float     { animation: float 3s ease-in-out infinite; }
.animate-pulse     { animation: pulse 2s ease-in-out infinite; }

/* Stagger delays */
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.40s; }
.delay-6 { animation-delay: 0.48s; }

/* Scroll-reveal: JS adds .is-visible when element enters viewport */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-left  { opacity: 0; transform: translateX(-30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-right { opacity: 0; transform: translateX(30px);  transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-left.is-visible, .reveal-right.is-visible { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(0.94); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal-scale.is-visible { opacity: 1; transform: scale(1); }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}

/* Page transition */
.page-wrapper { animation: fadeInUp 0.4s ease both; }

/* Ripple on buttons */
.btn { position: relative; overflow: hidden; }
.btn .ripple-effect {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0); animation: ripple 0.5s linear;
  pointer-events: none;
}

/* Loading spinner */
.spinner {
  width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: white; border-radius: 50%;
  animation: spin 0.7s linear infinite; display: inline-block;
}
.spinner.dark { border-color: rgba(30,111,217,0.2); border-top-color: #1E6FD9; }

/* Number counter animation class (JS-driven) */
.count-up { animation: countUp 0.4s ease both; }

/* Smooth page transitions for in-panel navigation */
.fade-slide { animation: fadeInUp 0.35s ease both; }
