.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 280px;
    max-width: 380px;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
    animation: slideInRight 0.3s ease forwards;
}

.toast::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: currentColor;
    animation: progress 3s linear forwards;
}

@keyframes progress {
    0% {
        transform: scaleX(1);
        transform-origin: left;
    }

    100% {
        transform: scaleX(0);
        transform-origin: left;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.hide {
    animation: slideOutRight 0.3s ease forwards;
}

.toast-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
}

.toast-close {
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: color 0.15s ease, transform 0.15s ease;
}

.toast-close:hover {
    color: #ef4444;
    transform: scale(1.1);
}

.toast-close:active {
    transform: scale(0.95);
}

.toast-success {
    border-left-color: #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-info {
    border-left-color: var(--primary);
}

.toast-info .toast-icon {
    color: var(--primary);
}

@media (prefers-reduced-motion: reduce) {
    .toast {
        animation: none !important;
    }

    .toast.hide {
        animation: none !important;
        opacity: 0;
    }

    .toast::before {
        animation: none !important;
    }

    .toast-close {
        transition: none !important;
    }
}