#toastBox {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
}

.toast {
    width: 350px;
    height: 50px;
    background: rgba(192, 192, 192, 0.2);
    font-weight: 500;
    margin: 15px 0;
    display: flex;
    align-items: center;
    position: relative;
    transform: translateX(100%);
    animation: moveLeft 0.5s linear forwards;
}

@keyframes moveLeft {
    100% {
        transform: translateX(0%);
    }
}

.toast i {
    margin: 0 20px;
}

.toast::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: green;
    animation: bar 5s linear forwards;
}

@keyframes bar {
    100% {
        width: 0;
    }
}

.toast.error::after {
    background: red;
}

.toast.invalid::after {
    background: orange;
}