/* Базовый стиль */
.toast {
    position: fixed;
    top: 12px;
    right: 16px;
    left: auto;
    margin: 0;

    width: calc(100% - 32px);
    max-width: 420px;

    padding: 16px 18px;

    display: flex;
    align-items: center;
    gap: 14px;

    border-radius: 14px;
    font-size: 16px;
    font-family: Montserrat, sans-serif;

    color: white;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);

    opacity: 0;
    transform: translateY(-15px);
    animation: toastFadeIn 0.25s forwards ease-out;

    z-index: 9999;
    min-width: 240px;
    max-width: 360px;
    backdrop-filter: blur(6px);
}

.toast--hide {
    animation: toastFadeOut 0.25s forwards ease-in;
}

.toast__icon {
    font-size: 22px;
    background: white;
    width: 32px;
    height: 32px;

    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;

    font-weight: bold;
    flex-shrink: 0;
    line-height: 1;
}

.toast__message {
    font-weight: 500;
    font-size: 15.5px;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
}

/* Цветовые темы */
.toast--success {
    background: #27ae60;
}

.toast--success .toast__icon {
    color: #27ae60;
}

.toast--error {
    background: #e74c3c;
}

.toast--error .toast__icon {
    color: #e74c3c;
}

.toast--warning {
    background: #f39c12;
}

.toast--warning .toast__icon {
    color: #f39c12;
}

.toast--info {
    background: #3498db;
}

.toast--info .toast__icon {
    color: #3498db;
}

/* Анимации */
@keyframes toastFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-15px);
    }
}

/* Адаптация под мобильные */
@media (max-width: 600px) {
    .toast {
        left: 0;
        right: 0;
        margin: 0 auto;

        width: calc(100% - 24px);
        max-width: none;

        font-size: 14px;
        border-radius: 12px;
        text-align: center;
    }

    .toast__icon {
        display: none;
    }
}