.site-contact-menu {
    --contact-blue: #3da2da;
    --contact-button-size: 66px;
    --contact-offset: max(16px, var(--contact-obstacle, 0px), calc(env(safe-area-inset-bottom) + 12px));
    position: fixed;
    z-index: 1000;
    right: max(17px, env(safe-area-inset-right));
    bottom: var(--contact-offset);
    font-family: inherit;
}

.site-contact-menu[hidden],
.site-contact-chat-open .site-contact-menu,
.modal-open .site-contact-menu,
.body-menu-opened .site-contact-menu {
    display: none;
}

.site-contact-ready .__jivoDesktopButton,
.site-contact-ready .__jivoMobileButton,
.site-contact-ready #jivo_custom_widget {
    display: none !important;
}

.contact-menu__toggle {
    --contact-button-fill: var(--contact-blue);
    display: grid;
    place-items: center;
    width: var(--contact-button-size);
    height: var(--contact-button-size);
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--contact-button-fill);
    color: #fff;
    box-shadow: 0 6px 15px rgba(17, 69, 106, .3);
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

.contact-menu__toggle:hover { --contact-button-fill: #268ac2; }
.contact-menu__toggle:active { transform: scale(.96); }

.contact-menu__toggle > span {
    position: relative;
    grid-area: 1 / 1;
    transition: opacity 150ms ease, transform 220ms cubic-bezier(.16, 1, .3, 1);
}

.contact-menu__bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 33px;
    height: 26px;
    border: 2px solid currentColor;
    border-radius: 11px 11px 11px 7px;
}

.contact-menu__bubble::after {
    content: "";
    position: absolute;
    left: 2px;
    bottom: -4px;
    width: 7px;
    height: 7px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    border-radius: 0 0 0 2px;
    background: var(--contact-button-fill);
    transform: skewY(-25deg);
}

.contact-menu__bubble span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: .65;
}

.contact-menu__toggle[aria-expanded="false"] .contact-menu__bubble span {
    animation: contact-menu-typing 2.9s ease-in-out infinite;
}

.contact-menu__toggle[aria-expanded="false"] .contact-menu__bubble span:nth-child(2) { animation-delay: .16s; }
.contact-menu__toggle[aria-expanded="false"] .contact-menu__bubble span:nth-child(3) { animation-delay: .32s; }

@keyframes contact-menu-typing {
    0%, 5%, 20%, 100% { opacity: .65; transform: translateY(0); }
    11% { opacity: 1; transform: translateY(-2px); }
}

.contact-menu__close {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    opacity: 0;
    transform: rotate(-30deg) scale(.82);
}

.contact-menu__close::before,
.contact-menu__close::after {
    content: "";
    position: absolute;
    width: 27px;
    height: 2.5px;
    border-radius: 2px;
    background: currentColor;
    transform: rotate(45deg);
}

.contact-menu__close::after { transform: rotate(-45deg); }
.contact-menu__toggle[aria-expanded="true"] .contact-menu__close { opacity: 1; transform: none; }
.contact-menu__toggle[aria-expanded="true"] .contact-menu__bubble { opacity: 0; transform: rotate(20deg) scale(.82); }

.contact-menu__panel {
    position: absolute;
    right: 0;
    bottom: calc(var(--contact-button-size) + 11px);
    width: min(232px, calc(100vw - 34px));
    max-height: calc(100vh - var(--contact-offset) - var(--contact-button-size) - 23px);
    max-height: calc(100dvh - var(--contact-offset) - var(--contact-button-size) - 23px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 6px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(23, 47, 72, .27);
    opacity: 0;
    visibility: hidden;
    transform: translateY(7px) scale(.97);
    transform-origin: bottom right;
    transition: opacity 150ms ease, transform 220ms cubic-bezier(.16, 1, .3, 1), visibility 0s 220ms;
}

.contact-menu__toggle[aria-expanded="true"] + .contact-menu__panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
}

.contact-menu__panel ul { margin: 0; padding: 0; list-style: none; }

.site-contact-menu .contact-menu__row {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 45px;
    padding: 4px 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #222;
    font: 400 14px / 1.2 'Ubuntu', Helvetica, Arial, sans-serif;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

@media (hover: hover) {
    .site-contact-menu .contact-menu__row:hover { background: #f0f7fc; color: #222; }
}

.site-contact-menu .contact-menu__chat[aria-busy="true"] { cursor: progress; }

.contact-menu__row:focus-visible,
.contact-menu__toggle:focus-visible {
    outline: 2px solid #175d86;
    outline-offset: -2px;
}

.contact-menu__icon {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    color: var(--contact-blue);
}

.contact-menu__icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-menu__badge {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border-radius: 24.9681%;
    color: #fff;
}

.contact-menu__leaf { background: linear-gradient(145deg, #82daf9 0%, var(--contact-blue) 37%, #1576bd 100%); }

.contact-menu__leaf::before {
    content: "";
    width: 15px;
    height: 15px;
    background: currentColor;
    -webkit-mask: url("/images/sources/contact-leaf.svg") center / contain no-repeat;
    mask: url("/images/sources/contact-leaf.svg") center / contain no-repeat;
}

.contact-menu__telegram { background: linear-gradient(138deg, #63dbff, #249fee 39%, #3159df); }
.contact-menu__telegram .icon-telegram { color: #fff; font-size: 15px; line-height: 1; }
.contact-menu__status { margin: 5px 8px; color: #175d86; font-size: 12px; line-height: 1.35; }
.contact-menu__status:empty { margin: 0; }

@media (max-width: 767px) {
    .site-contact-menu {
        --contact-button-size: 64px;
        --contact-offset: max(15px, var(--contact-obstacle, 0px), calc(env(safe-area-inset-bottom) + 12px));
        right: max(15px, env(safe-area-inset-right));
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-menu__toggle,
    .contact-menu__toggle > span,
    .contact-menu__panel { transition: none; }
    .contact-menu__toggle[aria-expanded="false"] .contact-menu__bubble span { animation: none; }
}
