﻿/* Задаем стиль уведомлений: */


.notif {
    width: 33%;
    position: fixed;
    left: 33%;
    top: 5px;
    z-index: 1070;
    margin: 0 auto 25px auto;
    padding: 30px 20px;
    text-align: left;
    border-radius: 12px;
    opacity: 0;
    cursor: default;
    display: none;
}


    .notif p {
        text-align: left;
        font-weight: bold;
        font-size: 16px;
        margin: 0px;
        padding: 10px;
    }


        .notif p::before {
            text-align: center;
            border: 3px solid rgba(255, 255, 255, 1);
            margin-top: -18px;
            top: 50%;
            right: 25px;
            width: 30px;
            content: '!';
            font-size: 26px;
            color: rgba(255, 255, 255, 1);
            position: absolute;
            height: 30px;
            line-height: 26px;
            border-radius: 50%;
        }


.notif-progress {
    width: 0;
    height: 10px;
    background: rgba(255,255,255,0.5);
    position: absolute;
    bottom: 5px;
    left: 3%;
    border-radius: 12px;
}


/* Устанавливаем цвета всплывающих уведомлений: */


.notif-color-1 {
    background: rgb(248,148,6,0.6);
}


    .notif-color-1 p {
        color: #FFF;
    }


.notif-color-2 {
    background: rgb(89,171,227,0.6);
}


    .notif-color-2 p {
        color: #FFF;
    }


.notif-color-3 {
    background: rgb(0,177,106,0.6);
}


    .notif-color-3 p {
        color: #FFF;
    }

.notif-color-4 {
    background: rgb(255,6,6,0.6);
}


    .notif-color-4 p {
        color: #FFF;
    }


/* Анимация: */


input.notify-trigger:checked ~ section .notif {
    display: block;
    -webkit-animation: fadeOut 5s linear forwards;
    -moz-animation: fadeOut 5s linear forwards;
    -o-animation: fadeOut 5s linear forwards;
    animation: fadeOut 5s linear forwards;
}


    input.notify-trigger:checked ~ section .notif .notif-progress {
        -webkit-animation: runProgress 4s linear forwards 0.7s;
        -moz-animation: runProgress 4s linear forwards 0.7s;
        -o-animation: runProgress 4s linear forwards 0.7s;
        animation: runProgress 4s linear forwards 0.7s;
    }


@-webkit-keyframes fadeOut {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
        -webkit-transform: translateY(0px);
    }

    99% {
        opacity: 0;
        -webkit-transform: translateY(-25px);
    }

    100% {
        opacity: 0;
    }
}


@-moz-keyframes fadeOut {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
        -moz-transform: translateY(0px);
    }

    99% {
        opacity: 0;
        -moz-transform: translateY(-25px);
    }

    100% {
        opacity: 0;
    }
}


@-o-keyframes fadeOut {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
        -o-transform: translateY(0px);
    }

    99% {
        opacity: 0;
        -o-transform: translateY(-25px);
    }

    100% {
        opacity: 0;
    }
}


@-ms-keyframes fadeOut {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
        -ms-transform: translateY(0px);
    }

    99% {
        opacity: 0;
        -ms-transform: translateY(-25px);
    }

    100% {
        opacity: 0;
    }
}


@keyframes fadeOut {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
        transform: translateY(0px);
    }

    99% {
        opacity: 0;
        transform: translateY(-25px);
    }

    100% {
        opacity: 0;
    }
}


@-webkit-keyframes runProgress {
    0% {
        width: 0%;
    }

    100% {
        width: 94%;
    }
}


@-moz-keyframes runProgress {
    0% {
        width: 0%;
    }

    100% {
        width: 94%;
    }
}


@-o-keyframes runProgress {
    0% {
        width: 0%;
    }

    100% {
        width: 94%;
    }
}


@-ms-keyframes runProgress {
    0% {
        width: 0%;
    }

    100% {
        width: 94%;
    }
}


@keyframes runProgress {
    0% {
        width: 0%;
    }

    100% {
        width: 94%;
    }
}


/* Варианты анимации для 2 и 3 уведомления: */


input.look-btn:checked ~ section .notif:nth-child(2) {
    -webkit-animation-duration: 4s;
    -moz-animation-duration: 4s;
    -o-animation-duration: 4s;
    animation-duration: 4s;
    -webkit-animation-delay: 0.2s;
    -moz-animation-delay: 0.2s;
    -o-animation-delay: 0.2s;
    animation-delay: 0.2s;
}


    input.look-btn:checked ~ section .notif:nth-child(2) .notif-progress {
        -webkit-animation-duration: 3s;
        -moz-animation-duration: 3s;
        -o-animation-duration: 3s;
        animation-duration: 3s;
        -webkit-animation-delay: 0.7s;
        -moz-animation-delay: 0.7s;
        -o-animation-delay: 0.7s;
        animation-delay: 0.7s;
    }


input.look-btn:checked ~ section .notif:nth-child(3) {
    -webkit-animation-duration: 9s;
    -moz-animation-duration: 9s;
    -o-animation-duration: 9s;
    animation-duration: 9s;
    -webkit-animation-delay: 0.4s;
    -moz-animation-delay: 0.4s;
    -o-animation-delay: 0.4s;
    animation-delay: 0.4s;
}


    input.look-btn:checked ~ section .notif:nth-child(3) .notif-progress {
        -webkit-animation-duration: 7.5s;
        -moz-animation-duration: 7.5s;
        -o-animation-duration: 7.5s;
        animation-duration: 7.5s;
        -webkit-animation-delay: 0.9s;
        -moz-animation-delay: 0.9s;
        -o-animation-delay: 0.9s;
        animation-delay: 0.9s;
    }
