:root {
    --toast-color: white;
    --toast-background-color: #616161;
    --toast-border: none;
}
:root.high-contrast {
    --toast-color: var(--main-color);
    --toast-background-color: var(--main-background-color);
    --toast-border: 1px solid var(--main-color);
}

.sm-toast {
    visibility: hidden; /* Hidden by default. Visible on click */
    min-width: 250px; /* Set a default minimum width */
    margin-left: -125px; /* Divide value of min-width by 2 */
    background-color: var(--toast-background-color);
    color: var(--toast-color);
    text-align: center; /* Centered text */
    border-radius: var(--main-dialog-border-radius); /* Rounded borders */
    padding: 16px; /* Padding */
    position: fixed; /* Sit on top of the screen */
    z-index: 1; /* Add a z-index if needed */
    left: 50%; /* Center the snackbar */
    bottom: 30px; /* 30px from the bottom */
    box-shadow: var(--button-box-shadow);
    border: var(--toast-border);
}

.sm-toast-show {
    visibility: visible; /* Show the snackbar */
    /* Add animation: Take 0.5 seconds to fade in and out the snackbar.
    However, delay the fade out process for 2.5 seconds */
    animation: sm-toast-fadein 0.5s, sm-toast-fadeout 0.5s 2.5s;
}

/* Animations to fade the snackbar in and out */
@keyframes sm-toast-fadein {
    from {
        bottom: 0;
        opacity: 0;
    }
    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes sm-toast-fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }
    to {
        bottom: 0;
        opacity: 0;
    }
}
