/* Transient toast notifications — driven by /assets/js/toast.js.
 *
 * Anchored top-right (just below the page-progress-bar). Each toast slides
 * in from the right and slides out on dismiss. The stack itself doesn't
 * intercept pointer events; individual toasts do. */

.toast-stack {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: calc(100vw - 32px);
    width: 360px;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border-left: 4px solid #6b7280;
    font-size: 0.88rem;
    color: #1f2937;
    line-height: 1.4;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 200ms ease, transform 200ms ease;
}

.toast--in {
    opacity: 1;
    transform: translateX(0);
}

.toast--leaving {
    opacity: 0;
    transform: translateX(20px);
}

.toast-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toast-icon svg {
    width: 18px;
    height: 18px;
}

.toast-message {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}

.toast-action {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: #2563eb;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0 4px;
}

.toast-action:hover {
    text-decoration: underline;
}

.toast-close {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
}

.toast-close:hover {
    color: #4b5563;
}

/* ── Variant colours ─────────────────────────────────────────────────── */

.toast--success {
    border-left-color: #10b981;
}
.toast--success .toast-icon { color: #047857; }

.toast--error {
    border-left-color: #ef4444;
    background: #fff5f5;
}
.toast--error .toast-icon { color: #b91c1c; }

.toast--warn {
    border-left-color: #f59e0b;
    background: #fffbeb;
}
.toast--warn .toast-icon { color: #b45309; }

.toast--info {
    border-left-color: #3b82f6;
}
.toast--info .toast-icon { color: #1d4ed8; }
