.contact-widget {
    position: fixed;
    top: 50%;
    right: 0;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 6px 8px 8px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid rgba(1, 30, 65, 0.08);
    border-right: 0;
    border-radius: 24px 0 0 24px;
    box-shadow: -5px 7px 24px rgba(1, 30, 65, 0.15);
    transform: translateY(-50%);
    isolation: isolate;
}

.contact-widget__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    box-sizing: border-box;
    color: #fff;
    text-decoration: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(1, 30, 65, 0.14);
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.contact-widget__link:hover,
.contact-widget__link:focus-visible {
    color: #fff;
    text-decoration: none;
    filter: brightness(1.05);
    transform: translateX(-3px);
    box-shadow: 0 8px 18px rgba(1, 30, 65, 0.2);
}

.contact-widget__link:focus-visible {
    outline: 3px solid rgba(1, 30, 65, 0.28);
    outline-offset: 2px;
}

.contact-widget__link--phone {
    background: #011e41;
}

.contact-widget__link--telegram {
    background: #229ed9;
}

.contact-widget__link--max {
    background: linear-gradient(145deg, #00bfff 0%, #471aff 58%, #9500ff 100%);
}

.contact-widget__icon {
    display: block;
    width: 23px;
    height: 23px;
    fill: currentColor;
}

.contact-widget__icon--max {
    width: 24px;
    height: 24px;
}

.header-modal__social .header-modal__social--item--telegram,
.header-modal__social .header-modal__social--item--max {
    color: #fff;
}

.header-modal__social .header-modal__social--item--telegram {
    background-color: #2ca5e0;
}

.header-modal__social .header-modal__social--item--max {
    margin-right: 0;
    background: linear-gradient(145deg, #00bfff 0%, #471aff 58%, #9500ff 100%);
}

.header-modal__social .contact-widget__icon {
    width: 22px;
    height: 22px;
}

.header-modal__social .contact-widget__icon--max {
    width: 23px;
    height: 23px;
}

@media (max-width: 767px) {
    .contact-widget {
        top: auto;
        bottom: calc(66px + env(safe-area-inset-bottom, 0px));
        gap: 4px;
        padding: 6px 3px 6px 5px;
        border-radius: 22px 0 0 22px;
        transform: none;
        box-shadow: -5px 6px 22px rgba(1, 30, 65, 0.14);
    }

    .contact-widget__link {
        width: 42px;
        height: 42px;
    }

    .contact-widget__link:hover,
    .contact-widget__link:focus-visible {
        transform: translateX(-2px);
    }

    .contact-widget__icon {
        width: 21px;
        height: 21px;
    }

    .contact-widget__icon--max {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 374px) {
    .contact-widget {
        gap: 3px;
        padding: 5px 3px 5px 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-widget__link {
        transition: none;
    }
}
