/* FILE: static/css/loading-overlay.css */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #4f46e5 100%);
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    animation: loadingFadeIn 0.25s ease;
}

.loading-overlay.show {
    display: flex;
}

@keyframes loadingFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loading-content {
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

/* ═══ Spinner ═══ */
.loading-spinner {
    position: relative;
    width: 100px;
    height: 100px;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spinnerRotate 1.4s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: #a5b4fc;
    animation-delay: -0.45s;
}

.spinner-ring:nth-child(2) {
    inset: 12px;
    border-top-color: #fbbf24;
    animation-delay: -0.3s;
    border-width: 3px;
}

.spinner-ring:nth-child(3) {
    inset: 24px;
    border-top-color: #34d399;
    animation-delay: -0.15s;
    border-width: 3px;
}

@keyframes spinnerRotate {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ═══ متن ═══ */
.loading-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loading-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
    letter-spacing: 2px;
}

.loading-page {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
}

/* ═══ نقش ═══ */
.loading-role {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.loading-role i {
    color: #a5b4fc;
    font-size: 15px;
}

.loading-role strong {
    color: #fff;
    font-weight: 800;
}

/* ═══ Mobile ═══ */
@media (max-width: 767px) {
    .loading-spinner { width: 80px; height: 80px; }
    .loading-page { font-size: 18px; }
    .loading-title { font-size: 12px; }
    .loading-role { font-size: 11.5px; padding: 10px 18px; }
}