/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
}

/* Loading Container */
.loading-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 400px;
    text-align: center;
}

/* Progress Bar Container */
.progress-container {
    background-color: #f0f0f0;
    border-radius: 10px;
    height: 10px;
    margin: 10px 0;
    overflow: hidden;
    position: relative;
}

/* Progress Bar */
.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #3B5998, #4CAF50);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
}

/* Progress Bar Animation */
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.3),
        rgba(255, 255, 255, 0.1)
    );
    animation: shimmer 1.5s infinite;
}

/* Progress Text */
.progress-text {
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    color: #3B5998;
    margin: 10px 0;
}

/* Percentage Display */
.progress-percentage {
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: #4CAF50;
    margin: 5px 0;
}

/* Loading Message */
.loading-message {
    font-family: 'Kanit', sans-serif;
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Small Upload Progress (for file uploads) */
.upload-progress {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Responsive Design */
@media screen and (max-width: 480px) {
    .loading-container {
        width: 90%;
        padding: 15px;
    }

    .progress-container {
        height: 8px;
    }

    .loading-message {
        font-size: 14px;
    }

    .progress-percentage {
        font-size: 14px;
    }
}

/* Active State */
.loading-overlay.active {
    display: flex;
}

/* Mini Progress Bar (for smaller operations) */
.mini-progress {
    height: 4px;
    max-width: 200px;
    margin: 5px auto;
}

/* Error State */
.progress-error {
    background: #ff6b6b;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 14px;
    display: none;
}