/* ── Toast container ── */
.toast-container {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-width: 380px;
    pointer-events: none;
}

/* ── Individual toast ── */
.toast {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    font-size: var(--font-size-sm);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: none;
}

.toast--visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.2s ease, transform 0.25s ease;
}

.toast--leaving {
    animation: toast-out 0.3s ease forwards;
}

@keyframes toast-out {
    to { opacity: 0; transform: translateX(100%); }
}

/* ── Dot (severity indicator) ── */
.toast-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    background: var(--color-primary);
}

.toast--success .toast-dot  { background: var(--color-success); }
.toast--warning .toast-dot  { background: var(--color-warning); }
.toast--critical .toast-dot { background: var(--color-error); }
.toast--info .toast-dot     { background: var(--color-primary); }

/* ── Content ── */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}

.toast-body {
    margin-top: var(--space-1);
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* ── Close button ── */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: var(--font-size-lg);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    margin-top: -2px;
}

.toast-close:hover {
    color: var(--color-text);
}

/* ── Left border accent ── */
.toast--success  { border-left: 3px solid var(--color-success); }
.toast--warning  { border-left: 3px solid var(--color-warning); }
.toast--critical { border-left: 3px solid var(--color-error); }
.toast--info     { border-left: 3px solid var(--color-primary); }

/* ── Mobile ── */
@media (max-width: 600px) {
    .toast-container {
        left: var(--space-2);
        right: var(--space-2);
        max-width: none;
    }
}
