﻿/* استایل‌های پیشرفت آپلود - نسخه بهبود یافته */
.upload-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.upload-progress-container.active {
    display: flex;
}

.upload-progress-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    min-width: 350px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.upload-progress-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
}

.upload-progress-text {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.upload-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4cd964, #5de24e);
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
}

.upload-progress-percent {
    color: var(--white);
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Vazir', sans-serif;
}

.upload-progress-details {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.upload-progress-filename {
    margin-bottom: 0.5rem;
    direction: ltr;
    text-align: center;
    word-break: break-all;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: monospace;
}

.upload-progress-size {
    direction: ltr;
    font-family: monospace;
}

/* استایل برای حالت در حال آپلود */
.upload-state-uploading .upload-progress-icon {
    animation: uploadPulse 1.5s infinite;
}

@keyframes uploadPulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1) rotate(5deg);
        opacity: 0.8;
    }
}

/* استایل برای حالت موفقیت */
.upload-state-success .upload-progress-card {
    background: linear-gradient(135deg, #4cd964 0%, #2ecc71 100%);
}

.upload-state-success .upload-progress-fill {
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.upload-state-success .upload-progress-icon {
    animation: successBounce 0.6s ease;
}

@keyframes successBounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* استایل برای حالت خطا */
.upload-state-error .upload-progress-card {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.upload-state-error .upload-progress-fill {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.upload-state-error .upload-progress-icon {
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% {transform: translateX(0);}
    25% {transform: translateX(-5px);}
    75% {transform: translateX(5px);}
}

/* دکمه‌ها */
.upload-action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.upload-close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.7rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.upload-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.upload-retry-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: 2px solid transparent;
    padding: 0.7rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.upload-retry-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .upload-progress-card {
        padding: 2rem;
        min-width: 280px;
        margin: 1rem;
    }
    
    .upload-progress-icon {
        font-size: 3rem;
    }
    
    .upload-progress-text {
        font-size: 1.1rem;
    }
    
    .upload-progress-percent {
        font-size: 1.8rem;
    }
    
    .upload-action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .upload-close-btn,
    .upload-retry-btn {
        width: 100%;
    }
}