/* Loading global para requisições AJAX */
.global-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.global-loading-overlay.active {
    display: flex;
}

.global-loading-spinner {
    width: 80px;
    height: 80px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #1F2C3B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.global-loading-text {
    color: white;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.global-loading-subtext {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Desabilitar cliques em todos os elementos quando loading ativo */
.global-loading-overlay.active ~ * {
    pointer-events: none;
}

/* Variações de loading para diferentes tipos de operação */
.global-loading-overlay.pdf-generation .global-loading-spinner {
    border-top-color: #e74c3c;
}

.global-loading-overlay.email-sending .global-loading-spinner {
    border-top-color: #3498db;
}

.global-loading-overlay.data-processing .global-loading-spinner {
    border-top-color: #f39c12;
}

/* Responsividade */
@media (max-width: 768px) {
    .global-loading-spinner {
        width: 60px;
        height: 60px;
        border-width: 4px;
    }
    
    .global-loading-text {
        font-size: 16px;
    }
    
    .global-loading-subtext {
        font-size: 12px;
    }
}
