/* toast-notifications.css - Стили для компонента уведомлений */

/* Контейнер для всех уведомлений */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 450px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Основной стиль уведомления */
.toast-notification {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transform: translateX(50px);
    animation: toast-slide-in 0.3s forwards;
    max-width: 100%;
    font-family: var(--body-3-font-family, "Comfortaa-Regular", sans-serif);
    line-height: 1.4;
}

/* Класс для исчезновения уведомления */
.toast-notification.toast-closing {
    animation: toast-slide-out 0.3s forwards;
}

/* Типы уведомлений */
.toast-success {
    background-color: #ECFDF3;
    border-left: 4px solid #27ae60;
    color: #1B7A41;
}

.toast-error {
    background-color: #FFF2F2;
    border-left: 4px solid #ff3e3e;
    color: #D32F2F;
}

.toast-warning {
    background-color: #FFF9E6;
    border-left: 4px solid #ffc107;
    color: #996500;
}

.toast-info {
    background-color: #E8F4FD;
    border-left: 4px solid #4a90e2;
    color: #0C63AB;
}

/* Иконка уведомления */
.toast-icon {
    flex-shrink: 0;
    margin-right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Содержимое уведомления */
.toast-content {
    flex: 1;
    min-width: 0;
}

/* Заголовок уведомления */
.toast-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
    color: inherit;
}

/* Текст уведомления */
.toast-message {
    font-size: 14px;
    margin: 0;
    color: inherit;
}

/* Кнопка закрытия */
.toast-close {
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.1);
}

.toast-close::before,
.toast-close::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 12px;
    background-color: currentColor;
}

.toast-close::before {
    transform: rotate(45deg);
}

.toast-close::after {
    transform: rotate(-45deg);
}

/* Индикатор прогресса */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.5);
    width: 100%;
    transform-origin: left;
}

.toast-success .toast-progress {
    background-color: rgba(39, 174, 96, 0.4);
}

.toast-error .toast-progress {
    background-color: rgba(255, 62, 62, 0.4);
}

.toast-warning .toast-progress {
    background-color: rgba(255, 193, 7, 0.4);
}

.toast-info .toast-progress {
    background-color: rgba(74, 144, 226, 0.4);
}

/* Анимации для уведомлений */
@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-slide-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

@keyframes progress-animation {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Иконки для разных типов уведомлений */
.toast-success-icon {
    width: 24px;
    height: 24px;
    fill: #27ae60;
}

.toast-error-icon {
    width: 24px;
    height: 24px;
    fill: #ff3e3e;
}

.toast-warning-icon {
    width: 24px;
    height: 24px;
    fill: #ffc107;
}

.toast-info-icon {
    width: 24px;
    height: 24px;
    fill: #4a90e2;
}

/* Респонсивные стили */
@media (max-width: 768px) {
    .toast-container {
        top: auto;
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
        width: auto;
    }

    .toast-notification {
        width: 100%;
        border-radius: 8px;
    }
}

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

    .toast-notification {
        padding: 12px;
    }

    .toast-title {
        font-size: 14px;
    }

    .toast-message {
        font-size: 13px;
    }
}