﻿.toastBox {
    position: fixed;
    top: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    overflow: hidden;
}

.custom-toast {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
    border-radius: 0.5rem;
    max-width: 400px;
    background: #fff;
    font-weight: 500;
    margin: 15px 0;
    display: flex;
    align-items: center;
    position: relative;
    transform: translateX(100%);
    animation: moveleft 0.5s linear forwards;
    padding: 1rem;
}

@keyframes moveleft {
    100% {
        transform: translateX(0);
    }
}

.custom-toast i {
    margin: 0 20px;
    font-size: 35px;
}

.custom-toast.success i {
    color: green;
}

.custom-toast.error i {
    color: red;
}

.custom-toast.warning i {
    color: orange;
}

.custom-toast::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 5px;
    animation: anim 5s linear forwards;
    border-radius: 0 0 0 0.5rem;
}

@keyframes anim {
    100% {
        width: 0;
    }
}

.custom-toast.success::after {
    background: green;
}

.custom-toast.error::after {
    background: red;
}

.custom-toast.warning::after {
    background: orange;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

    .close-btn i {
        color: lightgray !important;
        font-size: 1rem;
        margin: 0;
        padding: 0;
    }

    .close-btn i:hover {
        color: grey !important;
    }

.custom-toast.error .close-btn i,
.custom-toast.warning .close-btn i {
    color: #000;
}
