/* pn-microanim.css — Shared micro-interactions for PrescriberNow dashboards.
 * All animations honor prefers-reduced-motion. CSS-only. */

@keyframes pn-fade-in     { from { opacity: 0; } to { opacity: 1; } }
@keyframes pn-slide-up    { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pn-pop-in      { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes pn-pulse       { 0%,100% { box-shadow: 0 0 0 0 rgba(42,125,226,0.55); } 50% { box-shadow: 0 0 0 6px rgba(42,125,226,0); } }
@keyframes pn-shimmer-sweep {
  0%   { background-position: -150% 0; }
  100% { background-position: 250% 0; }
}
@keyframes pn-shake {
  0%, 100%        { transform: translateX(0); }
  20%, 60%        { transform: translateX(-6px); }
  40%, 80%        { transform: translateX(6px); }
}
@keyframes pn-check-draw {
  to { stroke-dashoffset: 0; }
}

.pn-fade-in   { animation: pn-fade-in    0.22s ease-out both; }
.pn-slide-up  { animation: pn-slide-up   0.28s ease-out both; }
.pn-pop-in    { animation: pn-pop-in     0.20s ease-out both; }

.pn-pulse {
  border-radius: 50%;
  animation: pn-pulse 1.6s ease-out infinite;
}

.pn-shimmer {
  position: relative;
  background-image: linear-gradient(110deg, transparent 40%, rgba(255,255,255,0.45) 50%, transparent 60%);
  background-size: 200% 100%;
  background-repeat: no-repeat;
  animation: pn-shimmer-sweep 1.2s ease-in-out;
}

.pn-shake { animation: pn-shake 0.4s ease-in-out both; }

.pn-success-check {
  stroke: #059669;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: pn-check-draw 0.5s ease-out 0.1s forwards;
}

/* Hover / press helpers */
.pn-hover-lift {
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
}
.pn-hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15,23,42,0.10);
}

.pn-hover-glow {
  transition: box-shadow 0.2s ease-out;
}
.pn-hover-glow:hover {
  box-shadow: 0 0 0 3px rgba(42,125,226,0.18), 0 4px 14px rgba(42,125,226,0.20);
}

.pn-press {
  transition: transform 0.08s ease-out;
}
.pn-press:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .pn-fade-in,
  .pn-slide-up,
  .pn-pop-in,
  .pn-pulse,
  .pn-shimmer,
  .pn-shake,
  .pn-success-check {
    animation: none !important;
  }
  .pn-success-check { stroke-dashoffset: 0; }
  .pn-hover-lift, .pn-hover-glow, .pn-press {
    transition: none !important;
  }
  .pn-hover-lift:hover { transform: none; }
  .pn-press:active     { transform: none; }
}
