@keyframes toastFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-4px);
    }
}

.toast-container {
    position: fixed;
    top: 62px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
    width: max-content;
    max-width: calc(100vw - 32px);
}

.toast {
    align-items: center;
    background-color: #fff;
    border-radius: 24px;
    color: var(--color-text-primary);
    cursor: pointer;
    display: inline-flex;
    font-family: var(--font-family-primary);
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    gap: 8px;
    line-height: 20px;
    max-width: 100%;
    padding: 12px 20px;
    pointer-events: auto;
    animation: toastFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    overflow-wrap: anywhere;
}

.toast__icon-wrapper {
    align-items: center;
    display: inline-flex;
    flex-shrink: 0;
    color: var(--color-blue);
}

.toast--error .toast__icon-wrapper {
    color: #ff2452;
}

.toast__icon {
    display: block;
    height: 18px;
    width: 18px;
}

.toast__content {
    min-width: 0;
}

.toast--hiding {
    animation: toastFadeOut 0.2s ease-in forwards;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .toast,
    .toast--hiding {
        animation-duration: 0.01ms;
    }
}
