﻿/* Сброс отступов и box-sizing для всех элементов */
*,
*:after,
*:before {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    outline: 0;
}

/* Анимации плавного появления и исчезания */
@keyframes fadeIn {
    0% {
        transform: scale(0.7);
        opacity: 0.5;
    }

    80% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}
/* Вендорные префиксы для анимации (WebKit) */
@-webkit-keyframes fadeIn {
    0% {
        -webkit-transform: scale(0.7);
        opacity: 0.5;
    }

    80% {
        -webkit-transform: scale(1.1);
    }

    100% {
        -webkit-transform: scale(1);
        opacity: 1;
    }
}

@-webkit-keyframes fadeOut {
    0% {
        -webkit-transform: scale(1);
        opacity: 1;
    }

    100% {
        -webkit-transform: scale(0);
        opacity: 0;
    }
}

/* Контейнер сообщения */
#msg_pop {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 250px;
    padding: 10px 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 13px;
    line-height: 1.2;
    box-shadow: 0 0 10px #999;
    border-radius: 15px;
    z-index: 99999;
}

    /* Заголовок в сообщении */
    #msg_pop h4 {
        margin: 0;
        text-align: center;
        font-size: 15px;
        color: #fff;
    }

/* Кнопка закрытия */
#msg_close {
    display: block;
    position: absolute;
    top: 5px;
    right: 10px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    color: #fff;
    cursor: pointer;
    border-radius: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

    #msg_close:hover {
        background-color: #fff;
        color: #000; /* чтобы крестик стал виден на светлом фоне */
    }

/* Классы анимаций */
.fadeIn {
    animation-name: fadeIn;
    animation-duration: 0.4s;
    animation-timing-function: ease-in-out;
    visibility: visible !important;
    -webkit-animation-name: fadeIn;
    -webkit-animation-duration: 0.4s;
    -webkit-animation-timing-function: ease-in-out;
}

.fadeOut {
    animation-name: fadeOut;
    animation-duration: 0.4s;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
    -webkit-animation-name: fadeOut;
    -webkit-animation-duration: 0.4s;
    -webkit-animation-timing-function: ease-in-out;
    -webkit-animation-fill-mode: forwards;
}