
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.3s linear;
}

.loader-overlay.hidden {
    visibility: hidden;
    opacity: 0;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.2);
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

#layout-costo-spedizione {
    position: relative;
}

/* Overlay bianco trasparente quando è in loading */
#layout-costo-spedizione.loading {
    position: relative;
}

#layout-costo-spedizione.loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7); /* Sfondo bianco trasparente */
    z-index: 1;
}

/* Posiziona il loader al centro */
#loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999; /* Sopra lo sfondo */
    display: none;
}

/* Mostra il loader quando è in loading */
#layout-costo-spedizione.loading #loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Spinner per animazione */
.content-spinner {
    border: 4px solid rgba(0, 0, 0, 0.2);
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}


@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

