/* Loading Spinner Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    min-width: 200px;
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 4px;
}

.loading-spinner .loading-text {
    margin-top: 15px;
    font-size: 16px;
    color: #495057;
    font-weight: 500;
}

.loading-spinner .loading-subtext {
    margin-top: 5px;
    font-size: 14px;
    color: #6c757d;
}

/* Stili per i bottoni durante il caricamento */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading .btn-text {
    opacity: 0;
}

.btn-loading .btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-loading .btn-spinner .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* Animazione pulse per elementi in caricamento */
.loading-pulse {
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* Stili per form disabilitati durante il caricamento */
.form-loading {
    position: relative;
    pointer-events: none;
}

.form-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 1;
}

.form-loading .form-control,
.form-loading .btn {
    opacity: 0.6;
} 