/* Unified Conversion Animations - Minimal & Sleek Design */

/* Core Animation System */
:root {
    --animation-primary: #1565C0;
    --animation-success: #28a745;
    --animation-warning: #ffc107;
    --animation-danger: #dc3545;
    --animation-light: rgba(21, 101, 192, 0.1);
    --animation-duration: 0.3s;
    --progress-height: 8px;
    --progress-radius: 4px;
}

/* Unified Progress Bar System */
.unified-progress {
    height: var(--progress-height);
    background: var(--animation-light);
    border-radius: var(--progress-radius);
    overflow: hidden;
    margin: 1rem 0;
}

.unified-progress-bar {
    height: 100%;
    background: var(--animation-primary);
    border-radius: var(--progress-radius);
    transition: width var(--animation-duration) ease;
    position: relative;
}

.unified-progress-bar.processing {
    background: linear-gradient(90deg, 
        var(--animation-primary) 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        var(--animation-primary) 100%);
    background-size: 200% 100%;
    animation: progressShimmer 1.5s linear infinite;
}

.unified-progress-bar.completed {
    background: var(--animation-success);
    width: 100% !important;
}

.unified-progress-bar.failed {
    background: var(--animation-danger);
}

@keyframes progressShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Unified Status Indicators */
.unified-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--animation-duration) ease;
}

.unified-status.queued {
    background: rgba(255, 193, 7, 0.1);
    color: #b45309;
}

.unified-status.processing {
    background: rgba(21, 101, 192, 0.1);
    color: var(--animation-primary);
}

.unified-status.completed {
    background: rgba(40, 167, 69, 0.1);
    color: var(--animation-success);
}

.unified-status.failed {
    background: rgba(220, 53, 69, 0.1);
    color: var(--animation-danger);
}

/* Unified Rotating Icon */
.unified-rotating {
    animation: unifiedRotate 1s linear infinite;
}

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

/* Unified Conversion Card */
.unified-conversion-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all var(--animation-duration) ease;
}

.unified-conversion-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Unified File Info */
.unified-file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.unified-file-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
}

.unified-file-icon.docx {
    background: linear-gradient(135deg, #2b5ce6 0%, #1a47b8 100%);
}

.unified-file-icon.pdf {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
}

.unified-file-details h6 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.unified-file-details .conversion-type {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
}

/* Unified Processing Stages */
.unified-stages {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(21, 101, 192, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(21, 101, 192, 0.08);
}

.unified-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    position: relative;
}

.unified-stage:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 14px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #e9ecef;
    z-index: 0;
}

.unified-stage.completed:not(:last-child)::after {
    background: var(--animation-success);
}

.unified-stage-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--animation-duration) ease;
    position: relative;
    z-index: 1;
}

.unified-stage.active .unified-stage-icon {
    background: var(--animation-primary);
    color: white;
    animation: stageActivate 0.4s ease-out;
}

.unified-stage.completed .unified-stage-icon {
    background: var(--animation-success);
    color: white;
}

.unified-stage-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6c757d;
    text-align: center;
}

.unified-stage.active .unified-stage-label {
    color: var(--animation-primary);
    font-weight: 600;
}

.unified-stage.completed .unified-stage-label {
    color: var(--animation-success);
    font-weight: 600;
}

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

/* Unified Action Buttons */
.unified-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
}

.unified-download-btn {
    background: var(--animation-success);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--animation-duration) ease;
}

.unified-download-btn:hover {
    background: #218838;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* Unified Queue Indicator */
.unified-queue {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 8px;
    margin: 1rem 0;
}

.unified-queue-dots {
    display: flex;
    gap: 4px;
}

.unified-queue-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--animation-warning);
    animation: queuePulse 1.2s ease-in-out infinite;
}

.unified-queue-dot:nth-child(2) { animation-delay: 0.2s; }
.unified-queue-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes queuePulse {
    0%, 80%, 100% { 
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .unified-conversion-card {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .unified-file-info {
        gap: 0.75rem;
    }
    
    .unified-file-icon {
        width: 32px;
        height: 32px;
        font-size: 9px;
    }
    
    .unified-stages {
        padding: 0.75rem;
        margin: 1rem 0;
    }
    
    .unified-stage-icon {
        width: 24px;
        height: 24px;
    }
    
    .unified-stage-label {
        font-size: 0.65rem;
    }
    
    .unified-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .unified-download-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animation Utilities */
.unified-fade-in {
    animation: fadeIn 0.4s ease-out;
}

.unified-slide-up {
    animation: slideUp 0.4s ease-out;
}

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

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