/* ─── Toast Sara — componente compartido del panel ─────────────────────── */

#sara-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
    max-width: calc(100vw - 48px);
}

.sara-toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 420px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: .875rem;
    line-height: 1.4;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: sara-toast-in .2s ease-out;
}

.sara-toast--success { background: var(--bs-success, #198754); }
.sara-toast--warning { background: var(--bs-warning, #ffc107); color: #000; }
.sara-toast--error   { background: var(--bs-danger,  #dc3545); }

.sara-toast__msg { flex: 1; word-break: break-word; }

.sara-toast__close {
    background: transparent;
    border: 0;
    color: inherit;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
    opacity: .8;
    flex-shrink: 0;
}
.sara-toast__close:hover,
.sara-toast__close:focus { opacity: 1; outline: none; }

.sara-toast--hide {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity .2s, transform .2s;
}

@keyframes sara-toast-in {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* En pantallas chicas, el toast ocupa ancho completo con márgenes parejos. */
@media (max-width: 575.98px) {
    #sara-toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
    .sara-toast {
        min-width: 0;
        max-width: none;
        width: 100%;
    }
}

/* Respetar prefers-reduced-motion: sin animación de entrada/salida. */
@media (prefers-reduced-motion: reduce) {
    .sara-toast { animation: none; }
    .sara-toast--hide { transition: none; }
}
