﻿/* global-loader.css */

/* نوار پیشرفت NProgress (سبز مدرن و ضخیم) */
#nprogress .bar {
    background: #00c853 !important;
    height: 4px !important;
}

#nprogress .peg {
    box-shadow: 0 0 10px #00c853, 0 0 5px #00c853;
}

/* لایه‌ی شیشه‌ای پس‌زمینه */
#global-spinner {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* spinner پیشرفته: دوتا دایره که خلاف جهت هم می‌چرخند */
.spinner {
    width: 50px;
    height: 50px;
    position: relative;
    margin-bottom: 10px;
}

    .spinner::before, .spinner::after {
        content: "";
        box-sizing: border-box;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: 4px solid #00c853;
        border-top-color: transparent;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

    .spinner::after {
        border: 4px solid #00c853;
        border-bottom-color: transparent;
        animation-direction: reverse;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* متن زیر spinner */
#global-spinner-text {
    font-family: IRANSans, sans-serif;
    font-size: 16px;
    color: #333;
    animation: fadeInOut 1.5s ease-in-out infinite;
}

/* انیمیشن ملایم متن */
@keyframes fadeInOut {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}
