/* MRANTI Grant Navigator - Subtle Professional Animations */

/* Smooth transitions for all interactive elements */
* {
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

/* Glowing button effects */
button:hover, 
a.inline-flex:hover, 
.hover\:bg-blue-700:hover,
.hover\:bg-green-700:hover {
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

/* Score bar animations - smooth fill effect */
@keyframes fillBar {
  from {
    width: 0%;
  }
}

.score-bar, 
[style*="width:"] {
  animation: fillBar 1s ease-out;
}

/* Glowing icons on hover */
svg:hover {
  filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.6));
  transform: scale(1.05);
}

/* Animated timeline progress */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* Current step pulse animation */
.relative.z-10 {
  animation: pulse 2s ease-in-out infinite;
}

/* Card hover effects */
.bg-white:hover, 
.rounded-xl:hover,
.shadow-sm:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Status badge glow effects */
.bg-green-500, .bg-green-100 {
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.bg-red-500, .bg-red-100 {
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.bg-blue-500, .bg-blue-100 {
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.bg-yellow-500, .bg-yellow-100 {
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.3);
}

/* Smooth icon rotation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

button:active svg {
  animation: rotate 0.5s ease-in-out;
}

/* Progress bar shimmer effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.h-2.rounded-full {
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

/* Fade in animations for panels */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bg-gradient-to-r,
.bg-gradient-to-br {
  animation: fadeIn 0.5s ease-out;
}

/* Smooth link hover effects */
a:hover {
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Input focus glow */
input:focus, 
textarea:focus, 
select:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 0 12px rgba(59, 130, 246, 0.2);
  transform: scale(1.01);
}

/* Table row hover */
tr:hover {
  background-color: rgba(59, 130, 246, 0.05);
  transition: background-color 0.2s ease;
}

/* Decision letter button pulse */
@keyframes buttonPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
}

a[href*="/letter"]:hover,
button[type="submit"]:hover {
  animation: buttonPulse 1.5s infinite;
}

/* Notification slide-in */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.bg-blue-50.border {
  animation: slideIn 0.3s ease-out;
}

/* Smooth modal/dropdown animations */
@keyframes dropDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.absolute.right-0 {
  animation: dropDown 0.2s ease-out;
}

/* Loading spinner rotation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Ripple effect on click */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

button:active::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ripple 0.6s ease-out;
}

/* Smooth number count-up effect */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.font-bold.text-2xl,
.font-bold.text-3xl {
  animation: countUp 0.5s ease-out;
}

/* Hover scale for clickable cards */
.cursor-pointer:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Smooth page transitions */
@keyframes pageLoad {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body {
  animation: pageLoad 0.3s ease-in;
}

/* Timeline step completion animation */
@keyframes checkmark {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.bg-green-500 svg {
  animation: checkmark 0.3s ease-out;
}

/* Removed: Background pattern was causing blue overlay issue */

/* Responsive hover states */
@media (hover: hover) {
  .hover\:shadow-lg:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  }
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
