/* ============================================================================
   Toast notifications
   API (in main-vanilla.js): toast.show({title, message, type, duration})
   Convenience: toast.success(msg), .info(msg), .warning(msg), .error(msg)
   ============================================================================ */

.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: calc(100vw - 32px);
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 360px;
    max-width: 100%;
    padding: 12px 14px 12px 14px;
    background: var(--m-surface, #fff);
    border: 1px solid var(--m-border, #e4e7ec);
    border-left-width: 4px;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.10);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 200ms ease, transform 200ms ease;
    font-family: var(--m-font, system-ui);
}
.toast.is-visible { opacity: 1; transform: translateX(0); }
.toast.is-leaving { opacity: 0; transform: translateX(20px); }
.toast__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.toast__body { flex: 1; min-width: 0; }
.toast__title {
    margin: 0 0 2px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--m-text, #1f2937);
    line-height: 1.3;
}
.toast__message {
    margin: 0;
    font-size: 13px;
    color: var(--m-text-muted, #475569);
    line-height: 1.45;
}
.toast__close {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
    border-radius: 4px;
    color: var(--m-text-faint, #94a3b8);
    cursor: pointer;
    margin: -2px -2px 0 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.toast__close:hover { background: var(--m-surface-2, #f8fafc); color: var(--m-text, #1f2937); }
.toast--success { border-left-color: var(--m-success, #10b981); }
.toast--success .toast__icon { background: var(--m-success-soft, #ecfdf5); color: var(--m-success, #10b981); }
.toast--info    { border-left-color: var(--m-accent, #4272d7); }
.toast--info    .toast__icon { background: var(--m-accent-soft, #eaf0fc); color: var(--m-accent, #4272d7); }
.toast--warning { border-left-color: var(--m-warning, #f59e0b); }
.toast--warning .toast__icon { background: var(--m-warning-soft, #fffbeb); color: var(--m-warning, #f59e0b); }
.toast--error   { border-left-color: var(--m-danger, #ef4444); }
.toast--error   .toast__icon { background: var(--m-danger-soft, #fef2f2); color: var(--m-danger, #ef4444); }
@media (max-width: 575.98px) {
    .toast-container { top: 12px; left: 12px; right: 12px; }
    .toast { width: 100%; }
}


