/* Enhanced Progress Template Styles */
.wpr-progress-template {
    padding: 0;
    overflow: hidden;
    min-height: 510px;
    
    &--running {
        .wpr-progress-header {
            border-left: 4px solid #0073aa;
        }
    }
    
    &--completed {
        .wpr-progress-header {
            border-left: 4px solid #00a32a;
        }
    }
    
    &--error {
        .wpr-progress-header {
            border-left: 4px solid #d63638;
        }
        
        .wpr-progress-bar-fill {
            background: linear-gradient(90deg, #d63638, #dc3545);
        }
    }
}

/* Progress Header */
.wpr-progress-header {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-left: 4px solid #0073aa;
    transition: all 0.3s ease;
    
    .wpr-modal-intro {
        margin: 0 0 8px 0;
        font-size: 16px;
        font-weight: 600;
        color: #1e1e1e;
    }
    
    .wpr-progress-subtitle {
        margin: 0;
        font-size: 14px;
        color: #757575;
        line-height: 1.4;
    }
}

/* Progress Bar */
.wpr-progress-bar-container {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpr-progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    
    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, 
            rgba(255,255,255,0.2) 25%, 
            transparent 25%, 
            transparent 50%, 
            rgba(255,255,255,0.2) 50%, 
            rgba(255,255,255,0.2) 75%, 
            transparent 75%, 
            transparent
        );
        background-size: 20px 20px;
        animation: progress-stripes 1s linear infinite;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    &:hover::before {
        opacity: 1;
    }
    
    &--complete {
        &::before {
            animation: none;
            opacity: 0;
        }
        
        &:hover::before {
            opacity: 0;
        }
    }
}

.wpr-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #005a87);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    
    &::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
        animation: progress-shine 2s ease-in-out infinite;
    }
    
    &--complete {
        background: linear-gradient(90deg, #00a32a, #28a745);
        
        &::after {
            animation: none;
        }
    }
}

.wpr-progress-percentage {
    font-size: 14px;
    font-weight: 600;
    color: #1e1e1e;
    min-width: 40px;
    text-align: right;
}

/* Steps Container */
.wpr-steps-container {
    margin-bottom: 24px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
}

/* Individual Step */
.wpr-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
    
    &:last-child {
        border-bottom: none;
    }
    
    &--active {
        background: #f8f9fa;
        border-left: 3px solid #0073aa;
        margin-left: -1px;
        
        &::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 3px;
            background: linear-gradient(180deg, #0073aa, #005a87);
            animation: active-pulse 2s ease-in-out infinite;
        }
    }
    
    &--pending {
        opacity: 0.6;
        
        .wpr-step-content {
            color: #757575;
        }
    }
    
    &--running {
        background: #f0f8ff;
        border-left: 3px solid #0073aa;
        margin-left: -1px;
        
        .wpr-step-content {
            color: #0073aa;
        }
    }
    
    &--completed {
        .wpr-step-content {
            color: #1e1e1e;
        }
        
        .wpr-step-icon--completed {
            animation: check-appear 0.5s ease-out;
        }
    }
    
    &--error {
        background: #fef7f7;
        border-left: 3px solid #d63638;
        margin-left: -1px;
        
        .wpr-step-content {
            color: #d63638;
        }
    }
}

/* Step Icons */
.wpr-step-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    
    &--pending {
        background: #e0e0e0;
        
        .wpr-step-dot {
            width: 8px;
            height: 8px;
            background: #9e9e9e;
            border-radius: 50%;
        }
    }
    
    &--running {
        background: #e3f2fd;
        
        .wpr-spinner {
            width: 16px;
            height: 16px;
            border: 2px solid #bbdefb;
            border-top: 2px solid #0073aa;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
    }
    
    &--completed {
        background: #e8f5e8;
        color: #2e7d32;
    }
    
    &--error {
        background: #ffebee;
        color: #d63638;
    }
}

/* Step Content */
.wpr-step-content {
    flex: 1;
    min-width: 0;
}

.wpr-step-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 4px 0;
}

.wpr-step-message {
    font-size: 13px;
    color: #757575;
    line-height: 1.3;
    margin: 0;
    animation: fade-in 0.3s ease-out;
}

/* Progress Button */
.wpr-progress-button {
    padding: 12px 24px;
    border-radius: 0;
    transition: all 0.3s ease;
    
    &--running {
        background: #0073aa;
        border-color: #0073aa;
        position: relative;
        overflow: hidden;
        
        &::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            animation: button-shine 2s ease-in-out infinite;
        }
    }
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes progress-stripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

@keyframes progress-shine {
    0% { transform: translateX(-100px); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

@keyframes active-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes check-appear {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes button-shine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

@keyframes fade-in {
    0% {
        opacity: 0;
        transform: translateY(-4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .wpr-progress-header {
        padding: 12px;
        
        .wpr-modal-intro {
            font-size: 15px;
        }
        
        .wpr-progress-subtitle {
            font-size: 13px;
        }
    }
    
    .wpr-step {
        padding: 12px;
        gap: 10px;
    }
    
    .wpr-step-icon {
        width: 20px;
        height: 20px;
        
        &--running .wpr-spinner {
            width: 14px;
            height: 14px;
        }
    }
    
    .wpr-step-title {
        font-size: 13px;
    }
    
    .wpr-step-message {
        font-size: 12px;
    }
    
    .wpr-progress-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wpr-progress-bar {
        border: 1px solid;
    }
    
    .wpr-step-icon {
        border: 1px solid;
    }
    
    .wpr-progress-template--running .wpr-progress-header {
        border-left-width: 6px;
    }
    
    .wpr-progress-template--completed .wpr-progress-header {
        border-left-width: 6px;
    }
    
    .wpr-progress-template--error .wpr-progress-header {
        border-left-width: 6px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wpr-progress-bar-fill,
    .wpr-step,
    .wpr-progress-button {
        transition: none;
        transform: none !important;
    }
    
    .wpr-spinner,
    .wpr-progress-bar::before,
    .wpr-progress-bar-fill::after,
    .wpr-step--active::before,
    .wpr-progress-button--running::after {
        animation: none;
    }
    
    .wpr-step-icon--completed {
        animation: none;
    }
    
    .wpr-step-message {
        animation: none;
    }
} 