.widget-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 60px;
    height: 60px;
    outline: none;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
    cursor: pointer;
    background-color: #fff;
    z-index: 10007;
}

.widget-button .item-1 {
    -webkit-animation: widget-message-animation 10s forwards .0s infinite;
    animation: widget-message-animation 10s forwards .0s infinite;
}

.widget-button .item-2 {
    animation: widget-message-animation-2 10s forwards .3s infinite;
    -webkit-animation: widget-message-animation-2 10s forwards .3s infinite;
}

.widget-button .message {
    background: black;
    position: relative;
    height: 10px;
    margin: 0 10px 2px;
    opacity: 0;
    width: 30px;
    border-radius: 10px;
    transition: .2s ease-out;
}

.widget-button .message.friend {
    margin-left: 20px;
}

.widget-button .item-1 {
    -webkit-animation: widget-message-animation 10s forwards .0s infinite;
    animation: widget-message-animation 10s forwards .0s infinite;
}

.widget-button.active .widget-icon {
    display: none;
}

.widget-link {
    position: relative;
    z-index: 1;
    background: inherit;
    border-radius: inherit;
    display: block;
}

.widget-icon {
    padding-top: 11px;
}

.widget-button:before {
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
}

.widget-button:after {
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

.widget-button:after,
.widget-button:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 2px;
    margin-top: -1px;
    margin-left: -13px;
    background: black;
    opacity: 1;
    transition: .05s;
}

.widget-button.active:after,
.widget-button.active:before {
    opacity: 1;
    transition: .3s;
}

.widget-popup {
    position: fixed;
    display: block;
    flex-direction: column;
    color: black;
    font-size: 16px;
    line-height: 22px;
    right: 0;
    bottom: 0;
    height: 100%;
    width: 100%;
    box-shadow: none;
    visibility: hidden;
    opacity: 0;
    -webkit-transform: translate(0, 10px);
    transform: translate(0, 10px);
    transition: none;
    max-width: 360px;
}

.widget-block {
    position: absolute;
    max-width: 320px;
    width: calc(100% - 40px);
    right: 0;
    margin-left: 20px;
    margin-right: 20px;
    bottom: 90px;
    display: flex;
    flex-direction: column;
    max-height: calc(100% - 110px);
    box-shadow: 30px 70px 70px rgba(0, 0, 0, 0.4), 0 5px 15px rgba(0,0,0,.1);
    background: white;
    border-radius: 16px;
    z-index: 10;
}

.widget-popup.active {
    visibility: visible;
    -webkit-transform: translate(0, 0);
    transform: translate(0, 0);
    opacity: 1;
    z-index: 1006;
    transition: transform .2s, opacity .3s;
}

.widget-block-img {
    text-align: center;
    overflow: hidden;
    max-height: 220px;
    border-radius: 10px 10px 0 0;
}

.widget-block-img img {
    max-width: 100%;
}

.widget-block-body {
    text-align: center;
}

.widget-block-content {
    padding: 25px 30px 15px;
    line-height: 1.33;
}
.widget-block-content a {
    text-decoration: underline;
    font-weight: bold;
    display: block;
}

.widget-block-footer {
    padding: 15px 0;
    text-align: center;
}

.widget-block-text {
    font-size: 12px;
    line-height: 18px;
    margin-top: 5px;
    padding: 0 25px;
    opacity: .66;
    position: relative;
    overflow: hidden;
}

.widget-block-text:after,
.widget-block-text:before {
    content: '';
    position: absolute;
    height: 1px;
    background: black;
    opacity: .2;
    left: 90%;
    margin: 0 8px;
    width: 200px;
    top: 8px;
    z-index: 0;
}

.widget-block-text:before {
    right: 90%;
    left: auto;
}

.widget-btn-item {
    display: inline-block;
    vertical-align: top;
    width: 66px;
    height: 64px;
    color: inherit;
}

.widget-btn-link {
    display: inline-block;
    width: 48px;
    margin: 8px;
    transition: .2s ease-out;
}

.widget-btn-link:hover,
.widget-btn-link:focus,
.widget-btn-link:focus:hover {
    -webkit-transform: translate(0, -3px);
    transform: translate(0, -3px);
}

.popup-visible .widget-button,
.popup-visible .widget-popup {
    z-index: 1;
}

@keyframes widget-message-animation {
    0% {
        opacity: 0;
        transform: translate(0, 14px);
    }
    4% {
        opacity: 1;
        transform: translate(0, 0);
    }
    12% {
        opacity: 1;
        transform: translate(0, 0);
    }
    15% {
        opacity: 0;
        transform: translate(0, -12px);
    }
    100% {
        opacity: 0;
        transform: translate(0, 10px);
    }
}

@-webkit-keyframes widget-message-animation {
    0% {
        opacity: 0;
        transform: translate(0, 14px);
    }
    4% {
        opacity: 1;
        transform: translate(0, 0);
    }
    12% {
        opacity: 1;
        transform: translate(0, 0);
    }
    15% {
        opacity: 0;
        transform: translate(0, -12px);
    }
    100% {
        opacity: 0;
        transform: translate(0, 10px);
    }
}

.widget-button .item-2 {
    animation: widget-message-animation-2 10s forwards .3s infinite;
    -webkit-animation: widget-message-animation-2 10s forwards .3s infinite;
}

@keyframes widget-message-animation-2 {
    0% {
        opacity: 0;
        transform: translate(0, 10px);
    }
    4% {
        opacity: 1;
        transform: translate(0, 0);
    }
    10% {
        opacity: 1;
        transform: translate(0, 0);
    }
    14% {
        opacity: 1;
        transform: translate(0, -12px);
    }
    22% {
        opacity: 1;
        transform: translate(0, -12px);
    }
    25% {
        opacity: 0;
        transform: translate(0, -20px);
    }
    100% {
        opacity: 0;
        transform: translate(0, 0);
    }
}

@-webkit-keyframes widget-message-animation-2 {
    0% {
        opacity: 0;
        transform: translate(0, 10px);
    }
    4% {
        opacity: 1;
        transform: translate(0, 0);
    }
    10% {
        opacity: 1;
        transform: translate(0, 0);
    }
    14% {
        opacity: 1;
        transform: translate(0, -12px);
    }
    22% {
        opacity: 1;
        transform: translate(0, -12px);
    }
    25% {
        opacity: 0;
        transform: translate(0, -20px);
    }
    100% {
        opacity: 0;
        transform: translate(0, 0);
    }
}

.widget-button .item-3 {
    -webkit-animation: widget-message-animation-3 10s forwards 1.4s infinite;
    animation: widget-message-animation-3 10s forwards 1.4s infinite;
}

@keyframes widget-message-animation-3 {
    0% {
        opacity: 0;
        transform: translate(0, 0);
    }
    4% {
        opacity: 1;
        transform: translate(0, -12px);
    }
    12% {
        opacity: 1;
        transform: translate(0, -12px);
    }
    16% {
        opacity: 1;
        transform: translate(0, -24px);
    }
    82% {
        opacity: 1;
        transform: translate(0, -24px);
    }
    86% {
        opacity: 0;
        transform: translate(0, -36px);
    }
    100% {
        opacity: 0;
        transform: translate(0, 0);
    }
}

@-webkit-keyframes widget-message-animation-3 {
    0% {
        opacity: 0;
        transform: translate(0, 0);
    }
    4% {
        opacity: 1;
        transform: translate(0, -12px);
    }
    12% {
        opacity: 1;
        transform: translate(0, -12px);
    }
    16% {
        opacity: 1;
        transform: translate(0, -24px);
    }
    82% {
        opacity: 1;
        transform: translate(0, -24px);
    }
    86% {
        opacity: 0;
        transform: translate(0, -36px);
    }
    100% {
        opacity: 0;
        transform: translate(0, 0);
    }
}

.widget-button .item-4 {
    -webkit-animation: widget-message-animation-4 10s forwards 2.7s infinite;
    animation: widget-message-animation-4 10s forwards 2.7s infinite;
}

@keyframes widget-message-animation-4 {
    0% {
        opacity: 0;
        transform: translate(0, -12px);
    }
    4% {
        opacity: 1;
        transform: translate(0, -24px);
    }
    20% {
        opacity: 1;
        transform: translate(0, -24px);
    }
    24% {
        opacity: 1;
        transform: translate(0, -24px);
    }
    70% {
        opacity: 1;
        transform: translate(0, -24px);
    }
    74% {
        opacity: 0;
        transform: translate(0, -40px);
    }
    100% {
        opacity: 0;
        transform: translate(0, 0);
    }
}

@-webkit-keyframes widget-message-animation-4 {
    0% {
        opacity: 0;
        transform: translate(0, -12px);
    }
    4% {
        opacity: 1;
        transform: translate(0, -24px);
    }
    20% {
        opacity: 1;
        transform: translate(0, -24px);
    }
    24% {
        opacity: 1;
        transform: translate(0, -24px);
    }
    70% {
        opacity: 1;
        transform: translate(0, -24px);
    }
    74% {
        opacity: 0;
        transform: translate(0, -40px);
    }
    100% {
        opacity: 0;
        transform: translate(0, 0);
    }
}

@media (max-height: 419px) and (min-width: 419px) {
    .widget-block {
        right: 70px;
        bottom: 10px;
        max-height: calc(100% - 20px);
    }
}
