.khs-contact-widget {
    position: fixed;
    right: 20px;
    bottom: 112px;
    z-index: 1080;
    font-family: var(--khs-font-sans, "Open Sans", Arial, sans-serif);
}

.khs-contact-widget__panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.khs-contact-widget__link {
    position: relative;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    overflow: visible;
    background: rgba(255, 247, 249, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.94),
        0 9px 24px rgba(87, 46, 58, 0.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.18);
    backdrop-filter: blur(18px) saturate(1.18);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.khs-contact-widget__link::before {
    content: attr(data-label);
    position: absolute;
    top: 50%;
    right: calc(100% + 10px);
    min-width: max-content;
    padding: 7px 10px;
    color: #4a3037;
    background: rgba(255, 247, 249, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.94);
    border-radius: 6px;
    box-shadow: 0 7px 20px rgba(87, 46, 58, 0.14);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    opacity: 0;
    pointer-events: none;
    transform: translate(6px, -50%);
    transition: opacity 160ms ease, transform 160ms ease;
}

.khs-contact-widget__link:hover,
.khs-contact-widget__link:focus-visible {
    transform: translateY(-2px) scale(1.03);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 12px 28px rgba(116, 31, 44, 0.26);
}

.khs-contact-widget__link:hover::before,
.khs-contact-widget__link:focus-visible::before {
    opacity: 1;
    transform: translate(0, -50%);
}

.khs-contact-widget__link:focus-visible,
.khs-contact-widget__toggle:focus-visible {
    outline: 3px solid #c7a56d;
    outline-offset: 3px;
}

.khs-contact-widget__icon-frame {
    width: 48px;
    height: 48px;
    display: block;
    overflow: hidden;
    background: #ffffff;
    border-radius: 50%;
}

.khs-contact-widget__icon {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}

.khs-contact-widget__link--phone .khs-contact-widget__icon {
    transform: scale(1.38);
}

.khs-contact-widget__toggle {
    display: none;
}

@media (min-width: 768px) and (max-width: 1023px) {
    .khs-contact-widget {
        right: 14px;
        bottom: 96px;
    }

    .khs-contact-widget__link {
        width: 54px;
        height: 54px;
    }

    .khs-contact-widget__icon-frame {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 767px) {
    .khs-contact-widget {
        top: 50%;
        right: 0;
        bottom: auto;
        width: 38px;
        height: 92px;
        pointer-events: none;
        transform: translateY(-50%);
    }

    .khs-contact-widget__panel {
        position: absolute;
        right: 8px;
        bottom: 0;
        gap: 10px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(14px) scale(0.92);
        transform-origin: right bottom;
        transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
    }

    .khs-contact-widget.is-open .khs-contact-widget__panel {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0) scale(1);
    }

    .khs-contact-widget__link {
        width: 52px;
        height: 52px;
        padding: 4px;
        pointer-events: auto;
    }

    .khs-contact-widget__link::before,
    .khs-contact-widget__link--phone {
        display: none;
    }

    .khs-contact-widget__icon-frame {
        width: 42px;
        height: 42px;
    }

    .khs-contact-widget__toggle {
        position: absolute;
        inset: 0;
        width: 38px;
        min-height: 92px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 11px 8px;
        pointer-events: auto;
        color: #ffffff;
        background: #8b2635;
        border: 1px solid #741f2c;
        border-left: 0;
        border-radius: 0 14px 14px 0;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.2),
            0 10px 26px rgba(116, 31, 44, 0.24);
        font-size: 12px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: 0;
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        cursor: pointer;
        opacity: 1;
        visibility: visible;
        transition: opacity 160ms ease, visibility 160ms ease, background-color 180ms ease, box-shadow 180ms ease;
    }

    .khs-contact-widget.is-open .khs-contact-widget__toggle {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .khs-contact-widget *,
    .khs-contact-widget *::before,
    .khs-contact-widget *::after {
        transition-duration: 0.01ms !important;
    }
}
