/* ── Toast notifications ───────────────────────────────────────────────── */

.toast-stack {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--wk-z-toast, 600);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    max-width: 420px;
    padding: 13px 14px 13px 16px;
    border-radius: var(--wk-r-lg, 16px);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid transparent;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    font-family: var(--wk-font, "Inter", sans-serif);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    pointer-events: all;
    animation: toast-in var(--wk-dur-slow, 300ms) var(--wk-ease-out, cubic-bezier(0, 0, 0.2, 1)) both;
}

.toast-exit {
    animation: toast-out var(--wk-dur-base, 200ms) var(--wk-ease-in, cubic-bezier(0.4, 0, 1, 1)) both;
}

/* ── Types ── */
.toast-success {
    background: rgba(5, 150, 105, 0.12);
    border-color: rgba(5, 150, 105, 0.25);
    color: #065f46;
}
.toast-error {
    background: rgba(186, 26, 26, 0.10);
    border-color: rgba(186, 26, 26, 0.25);
    color: #991b1b;
}
.toast-warning {
    background: rgba(217, 119, 6, 0.10);
    border-color: rgba(217, 119, 6, 0.25);
    color: #92400e;
}
.toast-info {
    background: rgba(8, 145, 178, 0.10);
    border-color: rgba(8, 145, 178, 0.25);
    color: #0e7490;
}

.dark .toast-success { background: rgba(5, 150, 105, 0.18); color: #6ee7b7; border-color: rgba(5, 150, 105, 0.30); }
.dark .toast-error   { background: rgba(186, 26, 26, 0.18); color: #fca5a5; border-color: rgba(186, 26, 26, 0.30); }
.dark .toast-warning { background: rgba(217, 119, 6, 0.18); color: #fcd34d; border-color: rgba(217, 119, 6, 0.30); }
.dark .toast-info    { background: rgba(8, 145, 178, 0.18); color: #67e8f9; border-color: rgba(8, 145, 178, 0.30); }

/* ── Icon ── */
.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ── Text ── */
.toast-text { flex: 1; }

/* ── Close ── */
.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: inherit;
    opacity: 0.6;
    transition: opacity var(--wk-dur-fast, 150ms);
    display: flex;
    align-items: center;
    border-radius: var(--wk-r-xs, 4px);
    flex-shrink: 0;
}
.toast-close:hover { opacity: 1; }
.toast-close .material-symbols-outlined { font-size: 16px; }

/* ── Animations ── */
@keyframes toast-in {
    from { opacity: 0; transform: translateX(24px) scale(0.96); }
    to   { opacity: 1; transform: translateX(0)    scale(1); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(0)    scale(1); }
    to   { opacity: 0; transform: translateX(24px) scale(0.96); }
}

/* Mobile */
@media (max-width: 480px) {
    .toast-stack {
        bottom: 16px;
        right: 12px;
        left: 12px;
    }
    .toast {
        min-width: unset;
        max-width: unset;
        width: 100%;
    }
}
