/* Staff Assignment Animations and Transitions */

/* Pulse animation for drop zones */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Smooth hover animations for staff cards */
.staff-card {
  transform: translateZ(0); /* Enable hardware acceleration */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.staff-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.staff-card:active {
  transform: translateY(0) scale(0.98);
}

/* Enhanced drag feedback */
.staff-card.dragging {
  transform: rotate(5deg) scale(0.95);
  opacity: 0.8;
  z-index: 1000;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Drop zone highlight animations */
.drop-zone-active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 197, 253, 0.1) 100%);
  border-color: rgb(59, 130, 246);
  transform: scale(1.02);
  animation: pulse 1.5s infinite;
}

/* Success feedback animation */
@keyframes successPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.staff-card.success-feedback {
  animation: successPulse 0.6s ease-out;
}

/* Loading spinner with smooth fade */
.loading-overlay {
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

/* Notification slide animations */
.notification-enter {
  transform: translateX(100%);
  opacity: 0;
}

.notification-enter-active {
  transform: translateX(0);
  opacity: 1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-exit {
  transform: translateX(0);
  opacity: 1;
}

.notification-exit-active {
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Avatar color transitions */
.staff-avatar {
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.staff-avatar:hover {
  transform: scale(1.1);
}

/* Button hover effects */
.remove-button {
  transition: all 0.2s ease;
}

.remove-button:hover {
  transform: scale(1.1);
  background-color: rgba(239, 68, 68, 0.1);
}

/* Focus indicators for accessibility */
.staff-card:focus {
  outline: none;
  ring: 2px;
  ring-color: rgb(59, 130, 246);
  ring-offset: 2px;
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
  .staff-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  }

  .drop-zone-active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(147, 197, 253, 0.1) 100%);
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .staff-card:hover {
    transform: none;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.1);
  }

  .drop-zone-active {
    transform: scale(1.01);
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .staff-card,
  .staff-avatar,
  .remove-button,
  .loading-overlay,
  .notification-enter-active,
  .notification-exit-active {
    transition: none;
    animation: none;
  }

  .staff-card:hover {
    transform: none;
  }

  .drop-zone-active {
    transform: none;
    animation: none;
  }
}
