@media (max-width: 768px) {
    form.notif.notif-phone-open.notif--chat-links {
        box-sizing: border-box;
        width: 290px;
        max-width: calc(100vw - 24px);
        padding: 8px 12px;
        left: auto;
        /* The legacy theme writes the right inset inline on resize. */
        right: max(12px, env(safe-area-inset-right, 0px)) !important;
        bottom: max(12px, env(safe-area-inset-bottom, 0px));
    }

    form.notif.notif--chat-links:not(.active) {
        visibility: hidden;
        transform: translateY(calc(100% + 32px));
    }

    form.notif.notif--chat-links .notif__bottom {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 12px;
    }

    form.notif.notif--chat-links .notif__text,
    .fixed-popup .fixed-popup__phone {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        white-space: nowrap;
        direction: ltr;
        unicode-bidi: isolate;
    }

    form.notif.notif--chat-links .notif__text {
        margin: 0;
        font-size: 14px;
    }

    form.notif.notif--chat-links .chat-links,
    .fixed-popup .chat-links {
        flex: 0 0 auto;
        align-items: center;
        width: auto;
        margin: 0;
        gap: 8px;
    }

    form.notif.notif--chat-links .chat-links__btn,
    .fixed-popup .chat-links__btn,
    .fixed-popup .fixed-popup__btn {
        flex: 0 0 44px;
        width: 44px;
        min-width: 44px;
        height: 44px;
        margin: 0;
        border-radius: 50%;
    }

    .fixed-popup .fixed-popup__phone-wrapper {
        height: 44px;
    }
}
