/* Animations and keyframes */

/* --- CONSOLIDATED ANIMATIONS START --- */
@keyframes fadeInSimple {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes quranHookFadeInFromTop {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px); /* Include translateX for centering */
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0); /* Include translateX for centering */
    }
}

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

@keyframes fadeInFromBottom { /* For toast notifications */
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fadeOutToBottom { /* For toast notifications */
    from { opacity: 1; transform: translate(-50%, 0); }
    to { opacity: 0; transform: translate(-50%, -20px); }
}

@keyframes fadeInFromTop { /* For general UI elements */
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Animation Utility Classes - optimized */
.animate-toast-in {
    animation: fadeInFromBottom 0.15s ease-out forwards;
}

.animate-toast-out {
    animation: fadeOutToBottom 0.15s ease-out forwards;
}

.animate-general-fade-in {
    animation: fadeInFromTop 0.2s ease-out forwards;
}
/* --- CONSOLIDATED ANIMATIONS END --- */

/* Qibla and AR Animations */
@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1.2); opacity: 0; }
}

/* Professional Qibla Alignment Animations */
@keyframes qibla-perfect-alignment {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 20px 0 rgba(34, 197, 94, 0.8);
        filter: brightness(1.1);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
        filter: brightness(1);
    }
}

@keyframes qibla-glow-pulse {
    0% { 
        box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
        filter: brightness(1);
    }
    50% { 
        box-shadow: 0 0 25px rgba(34, 197, 94, 0.8);
        filter: brightness(1.1);
    }
    100% { 
        box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
        filter: brightness(1);
    }
}

@keyframes smooth-rotation {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Professional Status Indicators */
.status-connected {
    background: linear-gradient(135deg, #10b981, #059669);
    animation: qibla-glow-pulse 2s ease-in-out infinite;
}

.status-high-accuracy {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.status-medium-accuracy {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.status-low-accuracy {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.status-disconnected {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    box-shadow: 0 0 8px rgba(107, 114, 128, 0.6);
}

/* Professional Qibla Indicator States */
.qibla-indicator-aligned {
    animation: qibla-perfect-alignment 3s ease-in-out infinite;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.8);
}

.qibla-indicator-close {
    animation: qibla-glow-pulse 2s ease-in-out infinite;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
}

/* Device Needle Animation */
.device-needle {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Compass Rose Smooth Rotation */
.compass-rose {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Progress Bar Animation */
.alignment-progress {
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth Fade Transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Professional Glass Effect */
.glass-effect {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-effect-dark {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Remove all bouncing and shaking animations */
.no-bounce {
    animation: none !important;
    transform: none !important;
}

/* Professional hover effects */
.professional-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.professional-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* AR Animations */
@keyframes ar-scan {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
}

.ar-scanning {
    animation: ar-scan 2s ease-in-out infinite;
}

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

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

/* Smooth Scale Animation */
@keyframes smooth-scale {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.smooth-scale {
    animation: smooth-scale 2s ease-in-out infinite;
} 