/* Schermata di caricamento: overlay scuro, anello giallo, testo bianco */
.cs-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(20, 20, 20, 0.72);
    color: #fff;
}

.cs-loader[hidden] {
    display: none;
}

.cs-loader-anello {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffc20e;
    animation: cs-gira 0.9s linear infinite;
}

.cs-loader p {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

@keyframes cs-gira {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cs-loader-anello {
        animation-duration: 3s;
    }
}

/* Avvisi a comparsa in basso (stile vecchio sito) */
.cs-toast {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 99998;
    max-width: 520px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.cs-toast-nascosto {
    opacity: 0;
    transform: translateY(12px);
}

.cs-toast-ok {
    background: #1e8449;
}

.cs-toast-err {
    background: #b03a2e;
}

.cs-toast-testa {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    background: rgba(0, 0, 0, 0.15);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
}

.cs-toast-testa span {
    flex: 1;
    font-weight: 700;
}

.cs-toast-testa time {
    opacity: 0.85;
}

.cs-toast-chiudi {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0 0 0 0.25rem;
    cursor: pointer;
}

.cs-toast p {
    margin: 0;
    padding: 0.9rem;
    font-size: 1.05rem;
    line-height: 1.4;
}
