:root {
    --gradients-button-promo-default: radial-gradient(136.12% 140.74% at 99.77% 99.04%, #8d28c8 0%, #7c42fa 20%, #007aff 80%, #609ceb 100%);
}

.messenger-block {
    position: fixed;
    right: 40px;
    bottom: 80px;
    z-index: 9999;
}

.messenger-block_btn {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 60px;
    height: 60px;
    cursor: pointer;
    background: #25d366;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    -webkit-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    transition: all 0.2s ease;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    -webkit-user-select: none;
}

.messenger-block_btn:hover {
    background: #25d366;
}

.messenger-block_btn:before {
    position: absolute;
    content: '';
    top: 50%;
    left: 50%;
    width: 25px;
    height: 25px;
    background-image: url("/local/templates/vseporogi/includes/callback-widget/sprite.png");
    background-repeat: no-repeat;
    background-size: 150px;
    transform: translate(-50%, -50%);
}

.messenger-block_btn:before {
    background-position: 1px -22px;
}

.active .messenger-block_btn:before {
    background-position: -41px -25px;
    background-size: 172px;
}

.messenger-block_btn:after {
    position: absolute;
    display: block;
    content: " ";
    left: -10px;
    right: -10px;
    top: -10px;
    bottom: -10px;
    border: 50%;
    border: 1px solid #25d366;
    border-radius: 50%;
    animation: animate_messenger 1.5s linear infinite;
    opacity: 0;
    backface-visibility: hidden;
}

@keyframes animate_messenger {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.messenger-block_info {
    display: none;
    position: absolute;
    right: 0;
    bottom: 75px;
    width: 340px;
    padding: 20px 30px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    -webkit-box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
    -moz-box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
}

.messenger-block_info.open {
    display: block;
    background: #ffffff;
}

.messenger-block_info:after {
    position: absolute;
    content: '';
    bottom: -5px;
    right: 22px;
    width: 16px;
    height: 16px;
    background: #fff;
    -ms-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
}

.messenger-block_info-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 11px;
    cursor: pointer;
    background-image: url("/local/templates/vseporogi/includes/callback-widget/sprite.png");
    background-position: -40px -12px;
    background-repeat: no-repeat;
    background-size: 80px;
    opacity: 0.4;
}

.messenger-block_panel {
    display: none;
    position: absolute;
    right: 0;
    bottom: 75px;
    width: 320px;
    padding: 92px 20px 20px;
    background-color: #fff;
    background-image: url("/local/templates/vseporogi/includes/callback-widget/logo.png");
    background-position: 20px 20px;
    background-repeat: no-repeat;
    background-size: 90px;
    -webkit-box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
    -moz-box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    overflow: hidden;
}

.messenger-block_panel:before {
    position: absolute;
    content: '';
    top: 70px;
    left: 0;
    right: 0;
    height: 1px;
    background: #eee;
}

.active .messenger-block_panel {
    display: block;
}

.messenger-block_title {
    margin-bottom: 8px;
    font-size: 19px;
    font-weight: bold;
    line-height: 26px;
}

.messenger-block_description {
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 20px;
}

.messenger-block_item {
    position: relative;
    display: block;
    margin-bottom: 10px;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    text-decoration: none !important;
    color: #fff !important;
    -webkit-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    transition: all 0.2s ease;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
}

.messenger-block_item:last-child {
    margin-bottom: 0;
}

.messenger-block_item.messenger {
    background-color: #0084ff;
}

.messenger-block_item.telegram {
    background-color: #0088cc;
}

.messenger-block_item.vk {
    background-color: #4c75a3;
}

.messenger-block_item.phone {
    background-color: #048834;
}

.messenger-block_item.whatsapp {
    background-color: #25d366;
}

.messenger-block_item.viber {
    background-color: #8049AF;
}

.messenger-block_item.max {
    background: var(--gradients-button-promo-default);
}

.messenger-block_item.messenger:hover {
    background-color: #0074ff;
}

.messenger-block_item.telegram:hover {
    background-color: #0078cc;
}

.messenger-block_item.vk:hover {
    background-color: #4c65a3;
}

.messenger-block_item.whatsapp:hover {
    background-color: #25c366;
}

.messenger-block_item.viber:hover {
    background-color: #8049AF;
}

.messenger-block_item.max:hover {
    background: radial-gradient(136.12% 140.74% at 99.77% 99.04%, #8d28c8 0%, #7c42fa 20%, #007aff 8);
}

.messenger-block_item:before {
    position: absolute;
    content: '';
    top: 10px;
    left: 15px;
    width: 20px;
    height: 20px;
    background-image: url("/local/templates/vseporogi/includes/callback-widget/sprite.png");
    background-repeat: no-repeat;
    background-size: 150px;
}

.messenger-block_item.messenger:before {
    background-position: -112px 0;
}

.messenger-block_item.telegram:before {
    background-position: 1px 0;
}

.messenger-block_item.vk:before {
    background-position: -74px 0;
}

.messenger-block_item.whatsapp:before {
    background-position: -37px 0;
}

.messenger-block_item.viber:before {
    background: url("/local/templates/vseporogi/includes/callback-widget/viber.png") !important;
}

.messenger-block_item.max:before {
    background: url("/local/templates/vseporogi/includes/callback-widget/max-logo.png") !important;
}

.messenger-block_item.phone:before {
    background: url("/local/templates/vseporogi/includes/callback-widget/phone.png") !important;
}

@media only screen and (max-width: 690px) {
    .messenger-block {
        right: 20px;
        bottom: 100px;
    }
}

@media only screen and (max-width: 360px) {
    .messenger-block_info {
        width: 320px;
    }

    .messenger-block_info {
        padding: 5px 15px;
    }

    .messenger-block_info br {
        display: none;
    }
}

@media only screen and (max-width: 320px) {

    .messenger-block_panel,
    .messenger-block_info {
        width: 280px;
    }

    .messenger-block_title {
        font-size: 16px;
    }

    .messenger-block_description {
        font-size: 12px;
        line-height: 16px;
    }

    .messenger-block_description br {
        display: none;
    }
}