/* =====================================================================
 * toasts.css — bottom-right stack of transient notifications fired by
 * window.Toast.show(). Pairs with js/ui/toast.js.
 * =====================================================================*/

.rtg-toast-stack {
    position: fixed;
    bottom: var(--space-5);
    right: var(--space-5);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    pointer-events: none;     /* let toasts pass through; each toast re-enables */
    max-width: calc(100vw - var(--space-10));
}

.rtg-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    min-width: 240px;
    max-width: 420px;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface);
    color: var(--text-default);
    border: 1px solid var(--border-default);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.88rem;
    line-height: 1.45;
    /* enter animation */
    opacity: 0;
    transform: translateY(8px);
    animation: rtg-toast-in 0.18s ease-out forwards;
}
.rtg-toast.is-leaving {
    animation: rtg-toast-out 0.16s ease-in forwards;
}

/* status variants */
.rtg-toast.is-success { border-left-color: var(--color-success); }
.rtg-toast.is-warning { border-left-color: var(--color-warning); }
.rtg-toast.is-danger  { border-left-color: var(--color-danger); }
.rtg-toast.is-info    { border-left-color: var(--color-accent); }

.rtg-toast-icon { font-size: 1rem; line-height: 1.45; }
.rtg-toast-body { flex: 1 1 auto; min-width: 0; }
.rtg-toast-title {
    display: block;
    margin: 0 0 2px;
    font-weight: 600;
    color: var(--text-strong);
}
.rtg-toast-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1;
    padding: 0 var(--space-1);
    cursor: pointer;
    flex: 0 0 auto;
}
.rtg-toast-close:hover { color: var(--text-default); }

@keyframes rtg-toast-in {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes rtg-toast-out {
    to { opacity: 0; transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
    .rtg-toast, .rtg-toast.is-leaving { animation: none; opacity: 1; transform: none; }
}
