﻿:root {
    --toast-success: #4CAF50;
    --toast-error: #f44336;
    --toast-info: #2196F3;
    --toast-warning: #ff9800;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
}

.toast {
    background: #333;
    color: white;
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease forwards;
    position: relative;
    overflow: hidden;
}

    .toast::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 4px;
    }

    .toast.success::before {
        background-color: var(--toast-success);
    }

    .toast.error::before {
        background-color: var(--toast-error);
    }

    .toast.info::before {
        background-color: var(--toast-info);
    }

    .toast.warning::before {
        background-color: var(--toast-warning);
    }

.toast-content {
    flex: 1;
    margin-right: 10px;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

    .toast-close:hover {
        color: white;
    }

.toast.progress {
    position: relative;
}

.toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    width: 100%;
    transform-origin: left;
    animation: progress linear forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}
