/**
 * Enhanced Progress Modal Styles
 * 
 * Provides professional progress feedback during account creation
 * and assessment submission processes.
 * 
 * @version 99.9.33
 * @since 99.8.2
 */

/* Progress Modal Overlay */
.ennu-progress-modal {
    max-width: 500px;
    min-width: 480px;
    width: 90%;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ennu-progress-modal .ennu-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 30px;
    text-align: center;
}

.ennu-progress-modal .ennu-modal-header h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.ennu-progress-modal .ennu-modal-body {
    padding: 40px 30px;
    background: #fafbfc;
}

/* Progress Container */
.ennu-progress-container {
    text-align: center;
}

.ennu-progress-spinner {
    margin-bottom: 30px;
}

.ennu-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e1e8ed;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    margin: 0 auto;
    transition: all 0.3s ease;
}

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

.ennu-spinner.success {
    border-color: #28a745;
    border-top-color: #28a745;
    animation: none;
    position: relative;
}

.ennu-spinner.success:after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #28a745;
    font-size: 24px;
    font-weight: bold;
    animation: checkmarkPop 0.3s ease-out;
}

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

@keyframes checkmarkPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Progress Text */
.ennu-progress-text {
    margin-top: 10px;
}

#ennu-progress-message {
    font-size: 16px;
    color: #495057;
    margin-bottom: 30px;
    line-height: 1.5;
    font-weight: 400;
}

/* Progress Steps */
.ennu-progress-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 350px;
    margin: 0 auto;
    position: relative;
}

.ennu-progress-steps:before {
    display: none;
}

.ennu-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 15px 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.ennu-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.ennu-step.active .ennu-step-number {
    background: #667eea;
    color: #ffffff;
    border-color: #667eea;
    animation: pulse 2s infinite;
}

.ennu-step.complete .ennu-step-number {
    background: #28a745;
    color: #ffffff;
    border-color: #28a745;
    animation: none;
}

.ennu-step.complete .ennu-step-number:after {
    content: '✓';
    position: absolute;
    font-size: 16px;
    font-weight: bold;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

.ennu-step-label {
    font-size: 13px;
    color: #6c757d;
    text-align: center;
    line-height: 1.3;
    font-weight: 500;
    transition: color 0.3s ease;
    width: 100%;
    max-width: 120px;
}

.ennu-step.active .ennu-step-label {
    color: #495057;
    font-weight: 600;
}

.ennu-step.complete .ennu-step-label {
    color: #28a745;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ennu-progress-modal {
        max-width: 95%;
        min-width: 320px;
        margin: 20px auto;
    }
    
    .ennu-progress-modal .ennu-modal-header {
        padding: 18px 20px;
    }
    
    .ennu-progress-modal .ennu-modal-header h3 {
        font-size: 16px;
    }
    
    .ennu-progress-modal .ennu-modal-body {
        padding: 30px 20px;
    }
    
    .ennu-progress-steps {
        flex-direction: column;
        gap: 15px;
        max-width: 280px;
    }
    
    .ennu-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 12px 15px;
    }
    
    .ennu-step-number {
        margin-bottom: 6px;
    }
    
    .ennu-step-label {
        text-align: center;
        max-width: 100px;
    }
}

@media (max-width: 480px) {
    .ennu-progress-modal {
        min-width: 300px;
    }
    
    .ennu-progress-modal .ennu-modal-header {
        padding: 16px 18px;
    }
    
    .ennu-progress-modal .ennu-modal-header h3 {
        font-size: 15px;
    }
    
    .ennu-progress-modal .ennu-modal-body {
        padding: 25px 18px;
    }
    
    #ennu-progress-message {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .ennu-spinner {
        width: 45px;
        height: 45px;
    }
    
    .ennu-progress-steps {
        max-width: 260px;
        gap: 12px;
    }
}

/* Form Error Styling */
.ennu-form-error {
    animation: errorSlideIn 0.3s ease-out;
    font-weight: 500;
}

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

/* Button States During Submission */
.ennu-assessment-form button[type="submit"]:disabled {
    background: #667eea !important;
    color: #ffffff !important;
    cursor: not-allowed !important;
    opacity: 0.8;
    position: relative;
}

.ennu-assessment-form button[type="submit"]:disabled:after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: buttonSpin 1s linear infinite;
}

@keyframes buttonSpin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Loading States */
.ennu-assessment-form.processing {
    opacity: 0.7;
    pointer-events: none;
}

.ennu-assessment-form.processing * {
    cursor: not-allowed !important;
}