/* Плавающий виджет мессенджеров (TG / MAX) */

.lk-widget {
    font: 400 16px/1.5 "Jost", sans-serif;
    color: #464451;
    position: fixed;
    right: 60px;
    bottom: 40px;
    z-index: 2000;
    isolation: isolate;
}

.lk-widget.is-open .lk-widget__offcanvas {
    opacity: 1;
    visibility: visible;
    transform: translate(0, 0) scale(1);
}

.lk-widget * {
    outline: none;
    box-sizing: border-box;
}

.lk-widget__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: #ec1111;
    color: #fff;
    border: none;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.4s;
}

.lk-widget__toggle svg {
    display: block;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
}

.lk-widget__toggle:hover {
    opacity: 0.8;
}

.lk-widget__toggle:active {
    transform: scale(0.98);
}

.lk-widget__offcanvas {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin: 0 0 40px;
    width: 350px;
    max-width: calc(100vw - 40px * 2);
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition:
        opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        visibility 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    visibility: hidden;
    transform: translate(-20px, 40px) scale(0);
    transform-origin: right bottom;
}

.lk-widget__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: auto;
    position: absolute;
    top: 0;
    left: 100%;
    z-index: 100;
    border: none;
    padding: 0;
    background: none;
    color: #2d201d;
    cursor: pointer;
    transition: opacity 0.4s;
}

.lk-widget__close svg {
    display: block;
    width: 17px;
    height: 17px;
    transition: transform 0.4s;
}

.lk-widget__close:hover {
    opacity: 0.8;
}

.lk-widget__head {
    background-color: #2d201d;
    background-position: 50% 50%;
    background-repeat: repeat;
    background-size: cover;
    color: #fff;
    border-radius: 30px 30px 0 0;
    padding: 15px;
}

.lk-widget__user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lk-widget__user-image {
    display: block;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.lk-widget__user-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lk-widget__user-desc {
    flex: 1;
}

.lk-widget__user-title {
    display: block;
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.lk-widget__user-text {
    display: block;
    margin: 0;
    font-size: 14px;
    font-weight: 400;
}

.lk-widget__body {
    padding: 15px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    max-height: calc(100svh - 70px - 40px * 4);
    border-radius: 0 0 30px 30px;
}

.lk-widget__body::-webkit-scrollbar {
    display: none;
}

.lk-widget__item {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 15px;
}

.lk-widget__item-image {
    position: sticky;
    bottom: 10px;
    display: block;
    width: 50px;
    height: 50px;
    overflow: hidden;
    border-radius: 50%;
    flex: 0 0 auto;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 0 50px;
}

.lk-widget__item-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lk-widget__item-desc {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lk-widget__item-blockquote {
    display: block;
    margin: 0;
    padding: 15px;
    border-radius: 15px;
    background: #f8f8f8;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    color: #464451;
}

.lk-widget__item-blockquote p {
    margin: 0 0 16px;
}

.lk-widget__item-blockquote p:last-child {
    margin-bottom: 0;
}

.lk-widget__item-social {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}

.lk-widget__btn {
    display: inline-flex;
    vertical-align: top;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    border-radius: 100px;
    gap: 6px;
    font-size: 11px;
    line-height: 1.5;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0 10px;
    transition: opacity 0.4s;
}

.lk-widget__btn:hover {
    text-decoration: none;
    opacity: 0.8;
}

.lk-widget__btn:active {
    transform: scale(0.98);
}

.lk-widget__btn svg {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.lk-widget__btn--max {
    background: linear-gradient(225deg, #983ddc 0%, #56c9fe 100%);
    color: #fff;
}

.lk-widget__btn--telegram {
    background: #35a9e5;
    color: #fff;
}

@media (max-width: 767px) {
    .lk-widget {
        right: 20px;
        bottom: 20px;
    }
    .lk-widget__offcanvas {
        margin: 0 0 20px;
        max-width: calc(100vw - 20px * 2);
    }
    .lk-widget__close {
        top: 20px;
        right: 15px;
        left: auto;
        bottom: auto;
        width: auto;
        height: auto;
        color: #fff;
    }
}
