/* ============================================
   Animations — Skeletons, Transitions
   ============================================ */

/* Skeleton pulse */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.06; }
  50% { opacity: 0.12; }
}

.skeleton {
  background: var(--color-text-primary);
  border-radius: var(--radius-md);
  animation: skeleton-pulse 1.8s ease-in-out infinite;
}

.skeleton--text {
  height: 14px;
  width: 60%;
  margin-bottom: var(--space-sm);
}

.skeleton--text-short {
  height: 14px;
  width: 40%;
}

.skeleton--bar {
  height: 8px;
  width: 100%;
}

.skeleton--ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.skeleton--thumb {
  aspect-ratio: 1;
  width: 100%;
}

/* Status dot pulse */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Fade in */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fade-in var(--transition-base) ease forwards;
}

/* Scale in (for modals) */
@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Toast in/out */
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(16px);
  }
}

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

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner--large {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

/* Stale data indicator */
@keyframes stale-blink {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.stale-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-xs);
  color: var(--color-warning);
  animation: stale-blink 3s ease infinite;
}
