/**
 * Loading Progress Bar Styles
 * Modern, animated loading overlay with progress bar
 */

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Loading Container */
.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Loading Content */
.loading-content {
    text-align: center;
    color: #ffffff;
    max-width: 500px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner */
.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading Text */
.loading-text {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* Progress Bar Container */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Progress Bar */
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 50%, #4CAF50 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    width: 0%;
    transition: width 0.03s linear;
    animation: shimmer 2s linear infinite;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

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

    100% {
        background-position: -200% 0;
    }
}

/* Loading Subtext */
.loading-subtext {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 10px 0 0;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
    .loading-content {
        max-width: 90%;
        padding: 30px 20px;
    }

    .loading-text {
        font-size: 20px;
    }

    .loading-spinner {
        width: 50px;
        height: 50px;
    }

    .loading-subtext {
        font-size: 12px;
    }
}

/* Pulse Animation for Spinner */
.loading-spinner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    border-radius: 50%;
    border: 4px solid rgba(76, 175, 80, 0.3);
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    #loading-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* Accessibility - Reduce Motion */
@media (prefers-reduced-motion: reduce) {

    #loading-overlay,
    .loading-content,
    .loading-spinner,
    .progress-bar {
        animation: none;
        transition: none;
    }
}