@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}


.snackbar {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: var(--border-radius-s);
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 30px;
    transform: translate(-45%, 0);
}

/* The "show" class is added to DIV when you need to show the snackbar */
.snackbar.show {
    visibility: visible;
    /* Show the snackbar */
    /* Add animation: Take 0.5 seconds to fade in and out the snackbar. */
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* Green background for success */
.snackbar.success {
    background-color: green;
}

/* Red background for error */
.snackbar.error {
    background-color: rgb(159 24 24);
}