/* ── Toast Notification System — Sprint 15 ── */

.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

.toast-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius, 8px);
    background: var(--surface, #1d1e36);
    border: 1px solid var(--border, #342d89);
    box-shadow: var(--shadow-lg, 0 12px 20px -3px rgba(0,0,0,0.6));
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: none;
    font-size: 14px;
    line-height: 1.5;
}

.toast-item.toast-enter {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-item.toast-exit {
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    .toast-item,
    .toast-item.toast-enter,
    .toast-item.toast-exit {
        transition: opacity 0.15s ease;
        transform: translateX(0);
    }
}

.toast-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-message {
    color: var(--text, #fff);
    word-break: break-word;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted, #b1afd0);
    font-size: 18px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    border-radius: 4px;
    transition: color 0.15s ease;
}

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

/* ── Variants ── */
.toast-success {
    border-left: 3px solid var(--brand-success, #10B981);
}

.toast-success .toast-icon {
    color: var(--brand-success, #10B981);
}

.toast-error {
    border-left: 3px solid var(--brand-danger, #E8620A);
}

.toast-error .toast-icon {
    color: var(--brand-danger, #E8620A);
}

.toast-warning {
    border-left: 3px solid var(--brand-warning, #F59E0B);
}

.toast-warning .toast-icon {
    color: var(--brand-warning, #F59E0B);
}

.toast-info {
    border-left: 3px solid var(--brand-info, #3B82F6);
}

.toast-info .toast-icon {
    color: var(--brand-info, #3B82F6);
}

/* ── Screen reader only ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .toast-container {
        right: 8px;
        left: 8px;
        max-width: none;
        width: auto;
    }
}
