@-webkit-keyframes pulse {
    0% {
        -webkit-transform: scale(0);
        opacity: 1;
        transform: scale(0);
    }
    50% {
        opacity: .5;
    }
    to {
        -webkit-transform: scale(1);
        opacity: 0;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        -webkit-transform: scale(0);
        opacity: 1;
        transform: scale(0);
    }
    50% {
        opacity: .5;
    }
    to {
        -webkit-transform: scale(1);
        opacity: 0;
        transform: scale(1);
    }
}

.messenger {
    width: 70px;
    height: 70px;
    position: fixed !important;
    bottom: 70px;
    right: 20px;
    z-index: 1000;
    transition: 0.6s;
}

.messenger * {
    user-select: none;
}

.messenger__switch {
    background-size: cover;
    background-repeat: no-repeat;
    align-items: center;
    background-color: var(--bs-primary);
    border-radius: 50%;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    height: 70px;
    justify-content: center;
    position: absolute;
    width: 70px;
}

.messenger__pulsation {
    animation: pulse 2s infinite;
    background-color: black;
    border-radius: 50px;
    height: 84px;
    left: -7px;
    position: absolute;
    top: -7px;
    transform: scale(0);
    width: 84px;
    z-index: -1;
}

.messenger__pulsation:nth-of-type(2n) {
    -webkit-animation-delay: .5s;
    animation-delay: .5s;
}

.messenger__pulsation.messenger-stop {
    -webkit-animation: none;
    animation: none;
}

.messenger__icons-line img {
    width: 22px;
    height: 22px;
}

.messenger__close {
    background-color: var(--bs-primary);
    border-radius: 100%;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    display: none;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
}

.messenger__close-icon:first-of-type {
    margin-left: 0;
}

.messenger__close-icon {
    -webkit-transform: rotate(180deg) scale(0);
    -ms-transform: rotate(180deg) scale(0);
    transform: rotate(180deg) scale(0);
    -webkit-transition: all .12s ease-in;
    -o-transition: all .12s ease-in;
    transition: all .12s ease-in;
}

.messenger__close.messenger-show {
    line-height: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.messenger__close.messenger-show {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: -ms-flexbox !important;
    display: flex !important;
}

.messenger__close.messenger-show .messenger__close-icon {
    width: 12px;
    height: 12px;
    -webkit-transform: rotate(0deg) scale(1);
    -ms-transform: rotate(0deg) scale(1);
    transform: rotate(0deg) scale(1);
}

.messenger__block {
    -webkit-transform: scale(0);
    -webkit-transform-origin: 80% 105%;
    -webkit-box-align: start;
    -webkit-align-items: flex-start;
    -ms-flex-align: start;
    align-items: flex-start;
    background-color: white;
    -webkit-box-shadow: 0 0 15px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 15px 2px rgba(0, 0, 0, 0.1);
    border-radius: 7px;
    bottom: 85px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    right: 0;
    padding: 20px;
    position: absolute;
    -ms-transform: scale(0);
    transform: scale(0);
    -ms-transform-origin: 80% 105%;
    transform-origin: 80% 105%;
    -webkit-transition: all .12s ease-out;
    -o-transition: all .12s ease-out;
    transition: all .12s ease-out;
    width: 255px;
    z-index: 9;
}

.messenger__block.messenger-show {
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1);
}

.messenger__btn {
    width: 100%;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    cursor: pointer;
    margin: 8px 0;
    line-height: 1.2;
    text-decoration: none;
}

.messenger__btn::before {
    border-radius: 50px;
    content: "";
    display: block;
    height: 40px;
    margin-right: 10px;
    width: 40px;
}

.messenger__btn-caption {
    color: rgba(0, 0, 0, 0.87);
    font-family: Arial, sans-serif;
    font-size: 14px;
    margin: 0;
}

.messenger__btn.messenger__btn_viber::before {
    background: #7c529d url("../images/messengers/viber.svg") no-repeat 50%;
}

.messenger__btn.messenger__btn_telegram::before {
    background: #2ca5e0 url("../images/messengers/telegram.svg") no-repeat 43%;
}

.messenger__btn.messenger__btn_whatsapp::before {
    background: #29df12 url("../images/messengers/whatsapp.svg") no-repeat 45% 45%;
    background-size: 68%
}

.messenger__btn.messenger__btn_phone::before {
    background: #661a1a url("../images/messengers/phone.svg") no-repeat center;
    background-size: 60%
}

.messenger__btn.messenger__btn_lifecell::before {
    background: url("../images/messengers/lifecell.svg") no-repeat center;
    background-size: contain;
}

.messenger__btn.messenger__btn_kyivstar::before {
    background: url("../images/messengers/kyivstar.svg") no-repeat center;
    background-size: contain;
}

.messenger__btn.messenger__btn_vodafone::before {
    background: url("../images/messengers/vodafone.svg") no-repeat center;
    background-size: contain;
}

.messenger__block.messenger-show {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

.messenger-bg {
    display: block;
    width: 0;
    height: 0;
    background-color: rgba(0, 0, 0, 0.7);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 111;
    opacity: 0;
    -webkit-transition: opacity .3s linear 0s, width 0s linear .3s, height 0s linear .3s;
    -o-transition: opacity .3s linear 0s, width 0s linear .3s, height 0s linear .3s;
    transition: opacity .3s linear 0s, width 0s linear .3s, height 0s linear .3s;
}

.messenger-bg.active {
    width: 100%;
    height: 100%;
    opacity: 1;
    -webkit-transition: opacity .3s linear 0s, width 0s linear 0s, height 0s linear 0s;
    -o-transition: opacity .3s linear 0s, width 0s linear 0s, height 0s linear 0s;
    transition: opacity .3s linear 0s, width 0s linear 0s, height 0s linear 0s;
}

@media (max-width: 991px) {
    .messenger {
        top: auto;
        right: 15px;
    }

    .messenger__static-caption {
        font-size: 6px;
    }

    .messenger-bg {
        display: none;
    }
}
