﻿.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-message {
    min-width: 300px;
    max-width: 400px;
    background: white;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid;
}

    .toast-message.toast-show {
        animation: slideInRight 0.3s ease-out;
    }

    .toast-message.toast-hide {
        animation: slideOutRight 0.3s ease-in forwards;
    }

/* Цвета для разных типов */
.toast-info {
    border-left-color: #2196f3;
}

    .toast-info .toast-icon svg {
        fill: #2196f3;
    }

.toast-success {
    border-left-color: #4caf50;
}

    .toast-success .toast-icon svg {
        fill: #4caf50;
    }

.toast-warning {
    border-left-color: #ff9800;
}

    .toast-warning .toast-icon svg {
        fill: #ff9800;
    }

.toast-error {
    border-left-color: #f44336;
}

    .toast-error .toast-icon svg {
        fill: #f44336;
    }

/* Иконка */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

    .toast-icon svg {
        width: 100%;
        height: 100%;
    }

/* Контент */
.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #1f2937;
}

.toast-message-text {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

/* Кнопка закрытия */
.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin: -4px -4px -4px 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

    .toast-close:hover {
        background-color: #f3f4f6;
    }

    .toast-close svg {
        fill: #9ca3af;
        transition: fill 0.2s;
    }

    .toast-close:hover svg {
        fill: #6b7280;
    }

/* Анимации */
@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;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 640px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast-message {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}
