/**
 * SindesiUI — stili per toast + confirm modal.
 * v0.42.14 (C2 audit Dienstleistungen §3).
 *
 * Coerente con il resto del design system Sindesi:
 * - accent blu #0280DE per bottoni conferma
 * - rosso #dc2626 per varianti danger
 * - shadow soft, radius 12–16px, transizioni 200ms ease-out
 */

/* ============================================================
   Toast float
   ============================================================ */
.sindesi-ui-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90vw;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 100001;
    cursor: pointer;
    animation: sindesi-ui-toast-in 220ms ease-out;
}

.sindesi-ui-toast--info {
    background: #1f2937;
    color: #ffffff;
}

.sindesi-ui-toast--success {
    background: #065f46;
    color: #ffffff;
}

.sindesi-ui-toast--error {
    background: #991b1b;
    color: #ffffff;
}

.sindesi-ui-toast--leaving {
    animation: sindesi-ui-toast-out 280ms ease-in forwards;
}

@keyframes sindesi-ui-toast-in {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes sindesi-ui-toast-out {
    from { opacity: 1; transform: translate(-50%, 0); }
    to   { opacity: 0; transform: translate(-50%, 8px); }
}

/* ============================================================
   Confirm modal
   ============================================================ */
.sindesi-ui-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: sindesi-ui-backdrop-in 180ms ease-out;
}

.sindesi-ui-modal {
    width: 100%;
    max-width: 440px;
}

.sindesi-ui-modal__card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    animation: sindesi-ui-modal-in 220ms ease-out;
}

.sindesi-ui-modal__title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.sindesi-ui-modal__body {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.sindesi-ui-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.sindesi-ui-modal__btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out;
}

.sindesi-ui-modal__btn--cancel {
    background: #f1f5f9;
    color: #334155;
    border-color: #e2e8f0;
}

.sindesi-ui-modal__btn--cancel:hover {
    background: #e2e8f0;
}

.sindesi-ui-modal__btn--confirm {
    background: #0280DE;
    color: #ffffff;
}

.sindesi-ui-modal__btn--confirm:hover {
    background: #026dbf;
}

.sindesi-ui-modal__btn--confirm.sindesi-ui-modal__btn--danger {
    background: #dc2626;
}

.sindesi-ui-modal__btn--confirm.sindesi-ui-modal__btn--danger:hover {
    background: #b91c1c;
}

.sindesi-ui-modal__btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(2, 128, 222, 0.35);
}

.sindesi-ui-modal__btn--danger:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.35);
}

@keyframes sindesi-ui-backdrop-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes sindesi-ui-modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile fine-tuning */
@media (max-width: 480px) {
    .sindesi-ui-modal__card {
        padding: 20px;
    }
    .sindesi-ui-modal__actions {
        flex-direction: column-reverse;
    }
    .sindesi-ui-modal__btn {
        width: 100%;
    }
}
