@media (max-width: 768px) {
    html #jdx-talk-window {
        position: fixed !important;
        top: var(--jdx-top, 0px) !important;
        height: var(--jdx-vh, 100dvh) !important;
        max-height: var(--jdx-vh, 100dvh) !important;
    }

    .jdx-talk-body,
    .jdx-talk-chat,
    #jdx-chat-normal-screen,
    .jdx-chat-messages {
        min-height: 0 !important;
    }

    .jdx-talk-bar,
    .jdx-chat-header,
    .jdx-chat-input-bar {
        flex-shrink: 0 !important;
    }

    .jdx-chat-input-bar {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 6px !important;
        padding: 8px 10px !important;
    }
    .jdx-chat-input-bar #jdx-input-msg {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        width: auto !important;
    }
    .jdx-chat-input-bar .jdx-ib,
    .jdx-chat-input-bar .jdx-chat-send {
        flex: 0 0 auto !important;
    }

    /* 16px evita o zoom automático do iPhone ao tocar no campo */
    #jdx-talk-window input {
        font-size: 16px !important;
    }
    /* Com o Talk aberto no celular: trava a página de trás (não puxa, não pisca, não recarrega) */
    @media (max-width: 768px) {
        html.jdx-talk-aberto,
        body.jdx-talk-aberto {
            overflow: hidden !important;
            overscroll-behavior: none !important;
        }
        #jdx-talk-window { overscroll-behavior: none !important; }
        #jdx-lista-contatos,
        #jdx-chat-messages { overscroll-behavior: contain !important; }
        #jdx-btn-popout { display: none !important; }
    }
}