

#toastBox {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
    z-index: 99999;
}

.toast {
    width: 350px;
    height: 70px;
    background: #fff;
    font-weight: 500;
    font-size: 14px;
    margin: 15px 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    position: relative;
    padding: 20px;
    transform: translateY(-100%);
    animation: dropDown 0.5s cubic-bezier(.25, .75, .5, 1.25) forwards;
}

@keyframes dropDown {
    0% {
        transform: translateY(-100%);
    }
    60% {
        transform: translateY(20px);
    }
    80% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.toast.dismiss {
    animation: slideUp 0.5s cubic-bezier(.25, .75, .5, 1.25) forwards;
}

@keyframes slideUp {
    0% {
        transform: translateY(0);
    }
    60% {
        tranform: translateY(-10px);
    }
    80% {
        transform: translateY(20px);;
    }
    100% {
        transform: translateY(-100%);
    }
}

.toast svg {
    margin: 0 20px;
    color: green;
}

.toast.error svg {
    color: red;
}

.toast.invalid svg {
    color: orange;
}

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

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

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

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


@media (max-width: 991px) {

    #toastBox {
        width: 550px;
        top: 120px;
        left: calc(50% - 100px);
    }
}

@media (max-width: 991px) {
    #toastBox {
        top: 100px;             /* Top Adjusted for Sidebar Toggle */
    }
}

@media (max-width: 434px) {

    #toastBox {
        width: 350px;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 376px) {

    #toastBox {
        width: 300px;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}