﻿#toast {
    visibility: hidden;
    display: flex;
    flex-direction: row;
    align-items: stretch; /* ensures both children are same height */
    width: 90%;
    max-width: 600px;
    min-width: 260px;
    margin: auto;
    background-color: #E53935;
    color: #fff;
    border-radius: 2px;
    position: fixed;
    z-index: 1000;
    left: 0;
    right: 0;
    top: 30px;
    font-size: 17px;
    box-sizing: border-box;
    overflow: hidden; /* ensures no overflow */
}



#toasterHeader {
    width: 120px;
    max-width:150px;
    background-color: #D32F2F;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

#toasterContent {
    color: #fff;
    padding: 16px;
    overflow-wrap: break-word;
    white-space: normal;
    word-break: break-word;
    flex: 1; /* fill remaining space */
    display: flex;
    align-items: center;
    box-sizing: border-box;
}


    #toast.show {
        visibility: visible;
        -webkit-animation: fadein 0.5s, expand 0.5s 0.5s,stay 3s 1s, shrink 0.5s 4s, fadeout 0.5s 4.5s;
        animation: fadein 0.5s, expand 0.5s 0.5s,stay 3s 1s, shrink 0.5s 4s, fadeout 0.5s 4.5s;
    }

/* Animations */
@-webkit-keyframes fadein {
    from {
        top: 0;
        opacity: 0;
    }

    to {
        top: 30px;
        opacity: 1;
    }
}

@keyframes fadein {
    from {
        top: 0;
        opacity: 0;
    }

    to {
        top: 30px;
        opacity: 1;
    }
}

@-webkit-keyframes expand {
    from {
        min-width: 50px
    }

    to {
        min-width: 240px;
    }
}

@keyframes expand {
    from {
        min-width: 50px
    }

    to {
        min-width: 240px;
    }
}

@-webkit-keyframes stay {
    from {
        min-width: 240px;
    }

    to {
        min-width: 240px;
    }
}

@keyframes stay {
    from {
        min-width: 240px;
    }

    to {
        min-width: 240px;
    }
}

@-webkit-keyframes shrink {
    from {
        min-width: 240px;
    }

    to {
        min-width: 50px;
    }
}

@keyframes shrink {
    from {
        min-width: 240px;
    }

    to {
        min-width: 50px;
    }
}

@-webkit-keyframes fadeout {
    from {
        top: 30px;
        opacity: 1;
    }

    to {
        top: 60px;
        opacity: 0;
    }
}

@keyframes fadeout {
    from {
        top: 30px;
        opacity: 1;
    }

    to {
        top: 60px;
        opacity: 0;
    }
}

/* Responsive tweaks for small screens */
@media (max-width: 576px) {
    #toast {
        font-size: 14px;
    }

        #toast #toasterHeader {
            width: 100px;
            font-size: 14px;
        }

        #toast #toasterContent {
            padding: 12px;
            font-size: 14px;
        }
}
