/* ═══════════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS - Dungeon Theme
   ═══════════════════════════════════════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    bottom: var(--space-xl, 20px);
    right: var(--space-xl, 20px);
    z-index: var(--z-toast, 1200);
    display: flex;
    flex-direction: column-reverse;
    gap: var(--space-sm, 8px);
    pointer-events: none;
    max-width: 400px;
    width: 100%;
}

.toast {
    pointer-events: auto;
    background: var(--bg-secondary, #1A1A1A);
    border: 2px solid var(--primary-color);
    padding: var(--space-md, 12px) var(--space-lg, 16px);
    font-family: var(--ascii-font-family);
    font-size: var(--font-size-sm, 12px);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.3),
                0 4px 20px rgba(0, 0, 0, 0.6);
    animation: toastSlideIn var(--transition-medium, 0.3s) ease-out;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm, 8px);
}

.toast.toast-removing {
    animation: toastSlideOut var(--transition-medium, 0.3s) ease-in forwards;
}

.toast-icon {
    flex-shrink: 0;
    font-size: var(--font-size-md, 14px);
    line-height: 1;
    margin-top: 1px;
}

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

.toast-message {
    line-height: var(--line-height-normal, 1.5);
    word-break: break-word;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--ascii-font-family);
    font-size: var(--font-size-base, 13px);
    padding: 0 var(--space-xs, 4px);
    transition: color var(--transition-fast, 0.15s);
    line-height: 1;
}

.toast-close:hover {
    color: var(--text-primary);
    text-shadow: 0 0 5px var(--primary-color);
}

/* Progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
    transition: width 0.1s linear;
}

/* Variants */
.toast--success {
    border-color: var(--color-success, #00FF66);
}
.toast--success .toast-icon { color: var(--color-success, #00FF66); text-shadow: 0 0 8px rgba(var(--color-success-rgb, 0, 255, 102), 0.6); }
.toast--success .toast-progress { background: var(--color-success, #00FF66); box-shadow: 0 0 5px var(--color-success, #00FF66); }

.toast--error {
    border-color: var(--color-error, #FF4444);
}
.toast--error .toast-icon { color: var(--color-error, #FF4444); text-shadow: 0 0 8px rgba(var(--color-error-rgb, 255, 68, 68), 0.6); }
.toast--error .toast-progress { background: var(--color-error, #FF4444); box-shadow: 0 0 5px var(--color-error, #FF4444); }

.toast--warning {
    border-color: var(--color-warning, #FBB954);
}
.toast--warning .toast-icon { color: var(--color-warning, #FBB954); text-shadow: 0 0 8px rgba(var(--color-warning-rgb, 251, 185, 84), 0.6); }
.toast--warning .toast-progress { background: var(--color-warning, #FBB954); box-shadow: 0 0 5px var(--color-warning, #FBB954); }

.toast--info {
    border-color: var(--color-info, #4A90D9);
}
.toast--info .toast-icon { color: var(--color-info, #4A90D9); text-shadow: 0 0 8px rgba(var(--color-info-rgb, 74, 144, 217), 0.6); }
.toast--info .toast-progress { background: var(--color-info, #4A90D9); box-shadow: 0 0 5px var(--color-info, #4A90D9); }

/* Animations */
@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .toast-container {
        left: var(--space-sm, 8px);
        right: var(--space-sm, 8px);
        bottom: var(--space-sm, 8px);
        max-width: none;
    }
}
