/**
 * Proje geneli "yükleniyor" overlay animasyonu.
 * Sayfa yenileme, form gönderimi, AJAX işlemleri öncesi showGlobalLoading() ile kullanılır.
 */
.global-loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.global-loading-overlay.is-visible {
    display: flex;
}
.global-loading-overlay .global-loading-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    padding: 1.5rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.global-loading-overlay .global-loading-spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #e9ecef;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: global-loading-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes global-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

/*
 * Koyu tema: ana shell (main) theme.css yüklemez; ayrıca sonradan yüklenen stillere karşı !important.
 * [data-theme="dark"] = html üzerindeki tema (ata üzerinden eşleşir).
 */
html[data-theme="dark"] .global-loading-overlay,
[data-theme="dark"] .global-loading-overlay {
    background: rgba(0, 0, 0, 0.72) !important;
}
html[data-theme="dark"] .global-loading-overlay .global-loading-box,
[data-theme="dark"] .global-loading-overlay .global-loading-box {
    background: #212529 !important;
    color: #e9ecef !important;
    border: 1px solid #343a40 !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5) !important;
}
html[data-theme="dark"] .global-loading-overlay .global-loading-spinner,
[data-theme="dark"] .global-loading-overlay .global-loading-spinner {
    border-color: #495057 !important;
    border-top-color: #6ea8fe !important;
}
html[data-theme="dark"] .global-loading-overlay #globalLoadingText,
[data-theme="dark"] .global-loading-overlay #globalLoadingText {
    color: #e9ecef !important;
}
