/* 
 * BFH Animations (animations.css)
 * Keyframes and transition utilities.
 */

/* Fade In */
@keyframes bfh-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
.bfh-animate-fade-in {
    animation: bfh-fade-in var(--bfh-anim-normal) forwards;
}

/* Slide Up */
@keyframes bfh-slide-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.bfh-animate-slide-up {
    animation: bfh-slide-up var(--bfh-anim-normal) forwards;
}

/* Slide Down (Toast) */
@keyframes bfh-slide-down {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Skeleton Pulse */
@keyframes bfh-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}
.bfh-skeleton {
    animation: bfh-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    background-color: var(--bfh-border);
    border-radius: var(--bfh-radius-md);
}

/* Spinner */
@keyframes bfh-spin {
    to { transform: rotate(360deg); }
}
.bfh-spinner {
    display: inline-block;
    /* Sized from a real token: --bfh-icon-md was never defined, so the spinner
       collapsed to nothing wherever it was used outside a widget. */
    width: var(--bfh-space-5);
    height: var(--bfh-space-5);
    border: 2px solid var(--bfh-border);
    border-top-color: var(--bfh-color-primary);
    border-radius: 50%;
    animation: bfh-spin 0.8s linear infinite;
}

/* Progress Bar Fill */
@keyframes bfh-progress-fill {
    from { width: 0%; }
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
