/* File Upload Progress Animations */

/* Upload Progress Container */
.upload-progress-container {
    background: rgba(248, 249, 250, 0.95);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    animation: slideInUp 0.3s ease-out;
}

/* File Progress Item */
.file-progress-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    transition: all 0.3s ease;
    animation: fadeInScale 0.4s ease-out;
}

.file-progress-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Upload Success Animation */
.upload-complete {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e8 100%);
    border-color: #d4edda;
}

.upload-success-animation {
    animation: successPulse 0.6s ease-out;
}

.upload-success-animation i {
    animation: checkmarkAppear 0.5s ease-out;
}

/* Progress Bar Enhancements */
.progress {
    border-radius: 10px;
    overflow: hidden;
    background-color: #e9ecef;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    transition: width 0.1s ease;
    border-radius: 10px;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.15) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.15) 50%, 
        rgba(255, 255, 255, 0.15) 75%, 
        transparent 75%, 
        transparent);
    background-size: 1rem 1rem;
}

/* Spinner Enhancement */
.spinner-border-sm {
    animation: customSpin 1s linear infinite;
}

/* File Upload Area Hover Effect */
.file-upload-area:hover {
    background-color: rgba(0, 123, 255, 0.05);
    border-color: #007bff;
    transition: all 0.3s ease;
}

/* File Name Animation */
.file-name {
    animation: typeWriter 0.8s ease-out;
}

/* Uploaded File Items */
.uploaded-file-item {
    animation: slideInLeft 0.4s ease-out;
    transition: all 0.3s ease;
}

.uploaded-file-item:hover {
    background-color: #f1f3f4 !important;
    transform: translateX(5px);
}

/* Delete Button Animation */
.delete-file-btn {
    transition: all 0.3s ease;
    opacity: 0.7;
}

.delete-file-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

/* Keyframe Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes checkmarkAppear {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes customSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes typeWriter {
    0% {
        width: 0;
        opacity: 0;
    }
    1% {
        opacity: 1;
    }
    100% {
        width: 100%;
        opacity: 1;
    }
}

/* Pulse Animation for Active Upload */
.progress-bar-animated {
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}

/* Smooth fade out animation */
.fade-out {
    transition: opacity 0.5s ease-out;
    opacity: 0;
}

/* Upload zone drag and drop effects */
.file-upload-zone {
    transition: all 0.3s ease;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
}

.file-upload-zone.drag-over {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
    transform: scale(1.02);
}

/* Success notification animation */
.upload-notification {
    animation: notificationSlide 0.5s ease-out;
}

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

/* Mobile responsiveness for animations */
@media (max-width: 768px) {
    .file-progress-item {
        padding: 8px;
    }
    
    .upload-progress-container {
        padding: 10px;
    }
    
    .file-name {
        max-width: 150px !important;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .file-progress-item,
    .upload-progress-container,
    .uploaded-file-item,
    .progress-bar {
        animation: none;
        transition: none;
    }
    
    .delete-file-btn:hover {
        transform: none;
    }
}