#toast {
    display: flex;
    align-items: center;
    max-width: 400px;
    width: fit-content;
    padding: 10px 14px;
    position: absolute;
    border-radius: 5px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    z-index: 5;
    top: 80px;
    right: 20px;
    transform: translateX(0%);
    direction: rtl;
    text-align: right;
}

#toast.left-bottom {
    bottom: 20px !important;
    left: 20px !important;
    right: unset !important;
    top: unset !important;
    height: fit-content !important;
}

#icon-wrapper{
    width: 40px;
    height: 40px;
    background: var(--secondary);
    border-radius: 50%;
    box-sizing: border-box;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#icon {
    background: var(--primary);
    border-radius: 50%;
    height: 90%;
    width: 90%;
    position: relative;
}
#icon::before, #icon::after {
    position: absolute;
    content: "";
    background: var(--secondary);
    border-radius: 5px;
    top: 50%;
    left: 50%;
}

#toast-message {
    padding: 5px 10px 5px 20px;
}
#toast-message h4, #toast-message p {
    margin: 0;
    line-height: 1.2em;
}
#toast-message h4 {
    font-size: 14px;
    font-weight: 600;
    color: #404040;
}
@media (max-width: 650px) {
    #toast-message h4 {
        font-size: 14px;
    }
}
#toast-message p {
    margin-top: 5px;
    font-size: 12px;
    color: #606060;
}
@media (max-width: 650px) {
    #toast-message p {
        font-size: 10px;
    }
}

#toast-close {
    position: relative;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: rgba(0,0,0,0);
    transition: background 0.2s ease-in-out;
}
#toast-close:hover {
    background: rgba(0,0,0,0.1);
}
#toast-close::before, #toast-close::after {
    position: absolute;
    content: '';
    height: 12px;
    width: 1px;
    border-radius: 5px;
    background: #606060;
    top: 50%;
    left: 50%;
    transition: background 0.2s ease-in-out;
}
#toast-close:hover::before, #toast-close:hover::after {
    background: #404040;
}
#toast-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
#toast-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
#toast-close:focus {
    outline: unset !important;
}
@keyframes close {
    from {
        /*top: 5px;*/
        top: 80px;
        opacity: 1;
        transform: translateX(0%) scale(1);
        visibility: visible;
        display: flex;
    }
    to {
        /*top: -25px;*/
        bottom: 0;
        opacity: 0;
        transform: translateX(0%) scale(0.5);
        visibility: hidden;
        display: none;
    }
}

@keyframes open {
    from {
        /*top: -25px;*/
        bottom: 0;
        opacity: 0;
        transform: translateX(0%) scale(0.5);
        visibility: hidden;
        display: none;
    }
    to {
        /*top: 5px;*/
        top: 80px;
        opacity: 1;
        transform: translateX(0%) scale(1);
        visibility: visible;
        display: flex;
    }
}

#toastTimer.toast-timer {
    width: 0%;
    height: 4px;
    background: var(--primary);
    position: absolute;
    bottom: 0;
    left: 0;
    border-top-right-radius: 5px;
    box-shadow: 0 0 8px var(--primary);
}
.timer-animation {
    animation: countdown 3s linear forwards;
}
@keyframes countdown {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* ----------------------- */
/* Success Styling         */
/* ----------------------- */
.success {
    --primary: #2DD743;
    --secondary: #E3FEE6;
}
.success #icon {
    transform: rotate(-45deg);
}
.success  #icon::before{
    width: 10px;
    height: 3px;
    transform: translate(calc(-50% + 1px), calc(-50% + 1px));
}
.success  #icon::after{
    width: 3px;
    height: 6px;
    transform: translate(calc(-50% - 3px), calc(-50% - 1px));
}

/* ----------------------- */
/* Warning Styling         */
/* ----------------------- */
.warning {
    --primary: #F29208;
    --secondary: #FFEEDF;
}
.warning  #icon::before{
    width: 3px;
    height: 3px;
    transform: translate(-50%, calc(-50% + 4px));
}
.warning  #icon::after{
    width: 3px;
    height: 7px;
    transform: translate(-50%, calc(-50% - 2px));
}

/* ----------------------- */
/* Error Styling           */
/* ----------------------- */
.error {
    --primary: #E63435;
    --secondary: #FFEAEC;
}
.error  #icon::before{
    width: 3px;
    height: 3px;
    transform: translate(-50%, calc(-50% + 4px));
}
.error  #icon::after{
    width: 3px;
    height: 7px;
    transform: translate(-50%, calc(-50% - 2px));
}

/* ----------------------- */
/* Info Styling            */
/* ----------------------- */
.info {
    --primary: #42C0F2;
    --secondary: #CFEFFC;
}
.info  #icon::before{
    width: 3px;
    height: 7px;
    transform: translate(-50%, calc(-50% + 2px));
}
.info  #icon::after{
    width: 3px;
    height: 3px;
    transform: translate(-50%, calc(-50% - 4px));
}

main button {
    padding: 0.6em 1.5em;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
}

#successBtn {
    border: 1px solid #2DD743;
    color: #2DD743;
    background: #E3FEE6;
}

#warningBtn {
    border: 1px solid #F29208;
    color: #F29208;
    background: #FFEEDF;
}

#errorBtn {
    border: 1px solid #E63435;
    color: #E63435;
    background: #FFEAEC;
}

#infoBtn {
    border: 1px solid #42C0F2;
    color: #42C0F2;
    background: #CFEFFC;
}
