/*
 * Notificaciones flotantes (app.js → notify). Las comparten el sistema y la
 * página de inicio.
 */

#toasts {
    position: fixed; inset-block-start: 1rem; inset-inline-end: 1.25rem;
    z-index: 1080; display: flex; flex-direction: column; gap: .6rem;
    /* El contenedor no intercepta clics; cada aviso sí, para poder cerrarlo.
       Así nada queda bloqueado detrás del hueco vacío de la columna. */
    pointer-events: none; max-width: min(30rem, calc(100vw - 2.5rem));
}

.app-toast {
    display: flex; align-items: center; gap: .75rem;
    padding: 1.05rem 1.35rem; border-radius: .7rem;
    font-size: 1.0625rem; font-weight: 600; line-height: 1.35;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .26);
    opacity: 0; transform: translateY(-.5rem);
    transition: opacity .2s ease-out, transform .2s ease-out;
    /* Clicable para cerrarlo al instante. */
    pointer-events: auto; cursor: pointer;
}
.app-toast:hover { filter: brightness(1.08); }
.app-toast.is-visible { opacity: 1; transform: none; }

/* Verde de confirmación: no es el acento de la marca, es semántica de
   estado. Contraste 4.6:1 del texto blanco sobre este fondo. */
.app-toast-success { background: #15803D; color: #FFFFFF; }
.app-toast-danger  { background: #B91C1C; color: #FFFFFF; }
/* Ámbar: se guardó, pero hay algo que revisar. Texto oscuro (contraste 8:1). */
.app-toast-warning { background: #F59E0B; color: #1F1300; }

.app-toast::before {
    content: ""; flex: none; width: 1.35rem; height: 1.35rem;
    background: currentColor;
    -webkit-mask: var(--toast-icon) center / contain no-repeat;
    mask: var(--toast-icon) center / contain no-repeat;
}
.app-toast-success { --toast-icon: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }
.app-toast-warning,
.app-toast-danger  { --toast-icon: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 8v5M12 17h.01'/%3E%3Cpath d='M10.4 3.6l-8.1 13.5A1.9 1.9 0 0 0 3.9 20h16.2a1.9 1.9 0 0 0 1.6-2.9L13.6 3.6a1.9 1.9 0 0 0-3.2 0'/%3E%3C/svg%3E"); }

@media (prefers-reduced-motion: reduce) {
    .app-toast { transition: none; transform: none; }
}
