/* ========================================================================== */
/* Animations                                                                 */
/* ========================================================================== */

@keyframes pulse-border {
  0%, 100% {
    border-color: rgba(59, 130, 246, 0.3);
  }
  50% {
    border-color: rgba(59, 130, 246, 0.7);
  }
}

@keyframes tool-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

@keyframes progress-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes progress-appear {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
}

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

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes assistant-section-expand {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

@keyframes section-expand {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 2000px; }
}

@keyframes market-spin {
  to { transform: rotate(360deg); }
}

@keyframes todo-progress-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(59, 130, 246, 0.3); }
  50% { box-shadow: 0 0 8px rgba(59, 130, 246, 0.5); }
}

@keyframes scroll-btn-appear {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; }
}

/* ========================================================================== */
/* Reduced Motion Preference                                                  */
/* ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Message appear animation (opacity only — safe for virtual list) */
@keyframes msg-appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.msg-fade-in {
  animation: msg-appear 0.3s ease-out;
}

/* Panel slide animations for enter/exit */
@keyframes panel-slide-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

