#toast {
    visibility: hidden;
    min-width: 200px;
    margin: auto;
    transform: translate(-50%, 0px);
    text-align: center;
    padding: 8px 16px;
    position: fixed;
    left: 50%;
    bottom: 30px;
    z-index: 1;
}

#toast.show {
    visibility: visible; /* Show the toast */
    /* Add animation: Take 0.5 seconds to fade in and out the toast.
    However, delay the fade out process for 2.5 seconds */
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* Animations to fade the toast in and out */
@-webkit-keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@-webkit-keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}

@keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}
