/**
 * Assessment Loading Overlay Styles
 */

.assessment-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.assessment-loading-overlay.active {
    display: flex;
    opacity: 1;
}

.loading-container {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.loading-icon {
    margin-bottom: 2rem;
}

.spinner {
    animation: rotate 2s linear infinite;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.spinner .path {
    stroke: #5B47FB;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.loading-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.loading-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 2.5rem;
}

.progress-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.progress-step::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: #e2e8f0;
    z-index: -1;
}

.progress-step:last-child::before {
    display: none;
}

.progress-step.active::before,
.progress-step.completed::before {
    background: #5B47FB;
}

.step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.progress-step.active .step-icon {
    background: #5B47FB;
    color: white;
    animation: pulse 1.5s ease-in-out infinite;
}

.progress-step.completed .step-icon {
    background: #10b981;
    color: white;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(91, 71, 251, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(91, 71, 251, 0);
    }
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    line-height: 1.2;
}

.progress-step.active .step-label {
    color: #5B47FB;
}

.progress-step.completed .step-label {
    color: #10b981;
}

.loading-progress {
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5B47FB, #7C68FF);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #5B47FB;
}

.loading-note {
    font-size: 0.875rem;
    color: #94a3b8;
    font-style: italic;
    margin: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .loading-container {
        padding: 2rem 1.5rem;
    }

    .loading-title {
        font-size: 1.5rem;
    }

    .loading-subtitle {
        font-size: 0.9375rem;
    }

    .progress-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .progress-step::before {
        display: none;
    }

    .step-label {
        font-size: 0.6875rem;
    }
}

@media (max-width: 480px) {
    .loading-container {
        width: 95%;
        padding: 1.5rem 1rem;
    }

    .spinner {
        width: 60px;
        height: 60px;
    }

    .loading-icon {
        margin-bottom: 1.5rem;
    }

    .loading-title {
        font-size: 1.25rem;
    }

    .progress-steps {
        gap: 1rem;
    }

    .step-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}
