
#js-toastHandler {
    position: fixed;
    bottom: 2rem; right: 2rem;

    /*
    top: 0; bottom: 0; right: 0;

    padding: 2rem 2rem 2rem 0;
    height: 100vh;
    overflow-y: auto;
    */


    min-width: 20rem;
    max-width: calc(100vw - 6rem);
    width: 20vw;

    z-index: 10;
}


.toast.log {color: var(--dg-color-toasts-dark); background: #fffffc}

.toast.currency,
.toast.normal {background: var(--dg-color-toasts-dark); color: white;}
.toast.info {background: var(--dg-color-toasts-blue); color: white;}
.toast.success {background: var(--dg-color-toasts-green); color: white;}
.toast.warning {background: var(--dg-color-toasts-orange); color: white;}
.toast.error {background: var(--dg-color-toasts-red); color: white;}
.toast.keys {background: var(--color-keys-light); color: var(--color-on-keys-light)}
.toast.diamonds {background: var(--color-diamonds-light); color: var(--color-on-diamonds-light)}

.toast {
    display: grid;
    grid-template-areas: 'icon title' 'icon body';
    /* grid-template-columns: 2.2rem 1fr; */
    grid-template-columns: 2.2rem calc(100% - 2.7rem);
    grid-gap: 0.5rem;

    margin-top: 20px;
    width: 100%;
    
    padding: 1rem;
    /* word-break: break-all; */

    border-radius: 0.5rem;
    box-shadow: var(--heavy-box-shadow);

    overflow: hidden;
}

.toast--icon {
    grid-area: icon;
    width: 2.2rem;
    height: 2.7rem;
    
    font-size: 1.7rem;
    line-height: 2.7rem;
}

.toast--title {
    grid-area: title;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1.2rem;
    width: 100%;
}

.toast--body {
    grid-area: body;
    font-size: 1rem;
    width: 100%;
}

.toast--close:hover {
    cursor: pointer;
    transform: scale3D(1.3, 1.3, 1.3);
}
.toast--close {
    position: absolute;
    top: 0.75rem; right: 1rem;
    
    font-size: 1.2rem;

    user-select: none;
    transition: 0.2s all !important;
}

.toast.active .toast--progress {
    animation: unLoad linear;
    animation-duration: inherit;
}

/* Keep the progress bar at 100% while the toast is coming into view */
.toast.fadeInRight .toast--progress {width: 100%}

.toast.normal .toast--progress {background: rgba(255, 255, 255, 0.8)}
.toast--progress {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0%;
    height: 5px;
    border-radius: 0 0 3px 3px;
    background: rgba(0, 0, 0, 0.2);
}





/* Width Animation */
@-webkit-keyframes unLoad {
    0% {width: 100%}
    99% {width: 0%}
}

@keyframes unLoad {
    0% {width: 100%}
    99% {width: 0%}
    /* on ne met pas 100%, parce que sinon le event 'onanimationend' du parent
    se déclanche au mauvais moment et il n'y a pas de fadeOut du Toast */
}