/* Animation keyframes and classes for the OKR Dashboard */

/* Status badge transitions */
@keyframes statusChange {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.status-change {
  animation: statusChange 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulseHighlight {
  0% { background-color: transparent; }
  50% { background-color: rgba(79, 70, 229, 0.1); }
  100% { background-color: transparent; }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Apply these animation classes as needed */
.animate-fadeIn {
  animation: fadeIn 0.3s ease-out forwards;
}

.animate-slideIn {
  animation: slideInRight 0.3s ease-out forwards;
}

.animate-pulse-highlight {
  animation: pulseHighlight 1.5s ease-in-out;
}

.animate-scaleIn {
  animation: scaleIn 0.25s ease-out forwards;
}

/* Staggered children animation delay utilities */
.stagger-delay-1 { animation-delay: 50ms; }
.stagger-delay-2 { animation-delay: 100ms; }
.stagger-delay-3 { animation-delay: 150ms; }
.stagger-delay-4 { animation-delay: 200ms; }
.stagger-delay-5 { animation-delay: 250ms; }

/* For parent-child relationship hover effect */
.objective-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Create a visual connection between levels */
.objective-card {
  position: relative;
}

.krcard {
  position: relative;
}

.krcard::before {
  content: '';
  position: absolute;
  top: 0;
  left: -10px;
  height: 100%;
  width: 2px;
  background: linear-gradient(to bottom, #e0e7ff 0%, #c7d2fe 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.krcard:hover::before {
  opacity: 1;
}

.action-item {
  position: relative;
}

.action-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -10px;
  height: 100%;
  width: 2px;
  background: linear-gradient(to bottom, #c7d2fe 0%, #a5b4fc 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.action-item:hover::before {
  opacity: 1;
}

/* Custom scrollbar for better UX */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
