/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

:root {
    --dark_toast: #34495E;
    --light_toast: rgba(255, 255, 255, 0.8);
    --success_toast: rgba(10, 191, 48, 0.8);
    --danger_toast: rgba(226, 77, 76, 0.8);
    --warning_toast: rgba(233, 189, 12, 0.8);
    --info_toast: rgba(52, 152, 219, 0.8);
}

.notifications {
    position: fixed;
    top: 50px;
    right: 20px;
    z-index: 9999;
}

    .notifications :where(.toast, .column) {
        display: flex;
        align-items: center;
    }

    .notifications .toast {
        width: 400px;
        position: relative;
        overflow: hidden;
        list-style: none;
        border-radius: 5px;
        padding: 10px 20px;
        margin-bottom: 10px;
        background: var(--light_toast);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
        justify-content: space-between;
        animation: show_toast 0.3s ease forwards;
        transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    }

        .notifications .toast.hide {
            opacity: 0;
            transform: translateX(100%);
        }

@keyframes show_toast {
    0% {
        transform: translateX(100%);
    }

    40% {
        transform: translateX(-5%);
    }

    80% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-10px);
    }
}

@keyframes hide_toast {
    0% {
        opacity: 1;
        transform: translateX(-10px);
    }

    40% {
        opacity: 0.6;
        transform: translateX(0);
    }

    80% {
        opacity: 0.3;
        transform: translateX(-5%);
    }

    100% {
        opacity: 0;
        transform: translateX(calc(100% + 20px));
    }
}

.toast::before {
    position: absolute;
    content: "";
    height: 3px;
    width: 100%;
    bottom: 0px;
    left: 0px;
    animation: progress 3s linear forwards;
}

.notifications .toast:hover::before,
.notifications .toast.paused::before {
    animation-play-state: paused;
}

@keyframes progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

@keyframes progress {
    100% {
        width: 0%;
    }
}

.toast.success::before, .btn_toast#success {
    background: var(--success_toast);
}

.toast.danger::before, .btn_toast#danger {
    background: var(--danger_toast);
}

.toast.warning::before, .btn_toast#warning {
    background: var(--warning_toast);
}

.toast.info::before, .btn_toast#info {
    background: var(--info_toast);
}

.toast .column i {
    font-size: 1.75rem;
}

.toast.success .column i {
    color: var(--success_toast);
}

.toast.danger .column i {
    color: var(--danger_toast);
}

.toast.warning .column i {
    color: var(--warning_toast);
}

.toast.info .column i {
    color: var(--info_toast);
}

.toast .column span {
    font-size: 0.85rem;
    margin-left: 12px;
}

.toast i:last-child {
    color: #aeb0d7;
    cursor: pointer;
}

    .toast i:last-child:hover {
        color: var(--dark);
    }

.buttons_toast .btn_toast {
    border: none;
    outline: none;
    cursor: pointer;
    margin: 0 5px;
    color: var(--light);
    font-size: 1.2rem;
    padding: 10px 20px;
    border-radius: 4px;
}

@media screen and (max-width: 530px) {
    .notifications {
        width: 95%;
    }

    .notifications .toast {
        width: 100%;
        font-size: 1rem;
        margin-left: 20px;
    }

    .buttons_toast .btn_toast {
        margin: 0 1px;
        font-size: 1.1rem;
        padding: 8px 15px;
    }
}
