/*
 * toast.css — Base styles for the toast control (controls/toast.js).
 *
 * Toasts stack bottom-right, slide up on appear, slide down on hide. Variants
 * (success / error / warning / info) tint the left edge. These base rules
 * were previously bundled inside chaos-controls.css, which is only loaded by
 * the Chaos and Forge apps; pulling them into a dedicated control stylesheet
 * loaded by index.html lets every app surface toasts consistently.
 *
 * Uses the project's theme tokens defined in shell.css (--bg-surface,
 * --border, --text-*). Light/dark themes swap automatically.
 */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 420px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.toast-visible { opacity: 1; transform: translateY(0); }
.toast-hiding  { opacity: 0; transform: translateY(12px); }

.toast-success { border-left: 3px solid #22c55e; }
.toast-error   { border-left: 3px solid #ef4444; }
.toast-warning { border-left: 3px solid #f59e0b; }
.toast-info    { border-left: 3px solid #3b82f6; }

.toast-icon { font-size: 14px; flex-shrink: 0; }
.toast-message { flex: 1; }

.toast-action {
    background: none;
    border: 1px solid var(--border);
    color: inherit;
    padding: 2px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    transition: background 0.15s;
    flex-shrink: 0;
}

.toast-action:hover { background: var(--bg-hover); }

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.toast-close:hover { opacity: 1; }
