/**
 * Animation Styles for Abbot.app
 * Helionyx Infrastructure Control System
 */

/* ===== LOADING ANIMATIONS ===== */

/* Loading Screen */
.loading-screen {
    @apply fixed inset-0 bg-gradient-to-br from-blue-900 via-purple-900 to-indigo-900 flex items-center justify-center z-50;
    animation: fadeIn 0.5s ease-out;
}

.loading-content {
    @apply text-center text-white;
}

.loading-logo {
    @apply text-6xl mb-8;
    animation: pulse 2s infinite;
}

.loading-text {
    @apply text-xl mb-4;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.loading-progress {
    @apply w-64 h-1 bg-white/20 rounded-full overflow-hidden mx-auto;
}

.loading-bar {
    @apply h-full bg-gradient-to-r from-blue-400 to-purple-400 rounded-full;
    animation: loadingProgress 3s ease-in-out infinite;
}

/* ===== ENTRANCE ANIMATIONS ===== */

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.5s ease-out;
}

.slide-in-down {
    animation: slideInDown 0.5s ease-out;
}

.zoom-in {
    animation: zoomIn 0.5s ease-out;
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

/* ===== INTERACTIVE ANIMATIONS ===== */

.hover-scale:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    transition: box-shadow 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
    transition: transform 0.3s ease;
}

/* ===== STATUS ANIMATIONS ===== */

.pulse-success {
    animation: pulseSuccess 2s infinite;
}

.pulse-warning {
    animation: pulseWarning 2s infinite;
}

.pulse-error {
    animation: pulseError 2s infinite;
}

.blink {
    animation: blink 1s infinite;
}

.heartbeat {
    animation: heartbeat 1.5s infinite;
}

/* ===== LOADING SPINNERS ===== */

.spinner {
    animation: spin 1s linear infinite;
}

.spinner-dots {
    @apply inline-flex space-x-1;
}

.spinner-dots span {
    @apply w-2 h-2 bg-current rounded-full;
    animation: spinnerDots 1.4s infinite ease-in-out both;
}

.spinner-dots span:nth-child(1) { animation-delay: -0.32s; }
.spinner-dots span:nth-child(2) { animation-delay: -0.16s; }
.spinner-dots span:nth-child(3) { animation-delay: 0s; }

.spinner-wave {
    @apply inline-flex space-x-1;
}

.spinner-wave span {
    @apply w-1 h-8 bg-current;
    animation: spinnerWave 1.2s infinite ease-in-out;
}

.spinner-wave span:nth-child(1) { animation-delay: -1.1s; }
.spinner-wave span:nth-child(2) { animation-delay: -1.0s; }
.spinner-wave span:nth-child(3) { animation-delay: -0.9s; }
.spinner-wave span:nth-child(4) { animation-delay: -0.8s; }
.spinner-wave span:nth-child(5) { animation-delay: -0.7s; }

/* ===== KEYFRAME DEFINITIONS ===== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes loadingProgress {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes pulseSuccess {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

@keyframes pulseWarning {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }
}

@keyframes pulseError {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

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

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spinnerDots {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

@keyframes spinnerWave {
    0%, 40%, 100% {
        transform: scaleY(0.4);
    }
    20% {
        transform: scaleY(1);
    }
}

/* ===== UTILITY CLASSES ===== */

.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }
.animate-delay-500 { animation-delay: 500ms; }
.animate-delay-700 { animation-delay: 700ms; }
.animate-delay-1000 { animation-delay: 1000ms; }

.animate-duration-fast { animation-duration: 150ms; }
.animate-duration-normal { animation-duration: 300ms; }
.animate-duration-slow { animation-duration: 500ms; }
.animate-duration-slower { animation-duration: 1000ms; }

.animate-ease-linear { animation-timing-function: linear; }
.animate-ease-in { animation-timing-function: ease-in; }
.animate-ease-out { animation-timing-function: ease-out; }
.animate-ease-in-out { animation-timing-function: ease-in-out; }

/* ===== RESPONSIVE ANIMATIONS ===== */

@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;
    }
}

/* ===== DARK MODE TRANSITIONS ===== */

.dark-mode-transition {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}