@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    user-select: none;
}

body {
    background: #f7edff;
}

/* button container */

.buttons {
    margin: 50px;
}

/* buttons */

.buttons button {
    color: #fff;
    border: 0;
    outline: 0;
    width: 120px;
    height: 40px;
    margin: 5px;
    border-radius: 10px;
    cursor: pointer;
    outline: none;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

.buttons button.Success {
    background-color: green;
}

.buttons button.Error {
    background-color: red;
}

.buttons button.Invalid {
    background-color: orange;
}

/* notification box */

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

/* notification */

.toast {
    width: 400px;
    height: 80px;
    background: #fff;
    font-weight: 500;
    margin: 15px 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    position: relative;
    transform: translateX(100%);
    animation: moveleft 0.5s linear forwards;
}

/* animation for toast notification */

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

/* icons */

.toast i {
    margin: 0 20px;
    font-size: 35px;
    color: green;
}

.toast.error i {
    color: red;
}

.toast.Invalid i {
    color: orange;
}

/* progress bar */

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

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

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

/* animation for progress bar */

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

/* responsiveness */

@media (max-width: 500px) {

    body {
        display: flex;
        justify-content: center;
    }

    .buttons {
        margin: 50px 20px;
    }

    #toastBox {
        bottom: 20px;
        right: 20px;
        padding: 10px;
    }

    .toast {
        width: 350px;
        height: 60px;
        margin: 10px 0;
    }
}

@media (max-width: 450px) {

    .buttons {
        margin: 30px 20px;
    }

    .buttons button {
        width: 100px;
        height: 35px;
    }
}

@media (max-width: 420px) {

    .toast {
        width: 300px;
        font-size: 15px;
    }

    .toast i {
        font-size: 25px;
    }
}

@media (max-width: 400px) {

    .buttons button {
        width: 80px;
    }

    #toastBox {
        bottom: 10px;
        right: 10px;
    }
}

@media (max-width: 350px) {

    .toast {
        width: 280px;
    }
}