/* ==========================================================================
 * SAC Widget (FacialRecognition)
 * O SAC é acionado pelo botão dentro do modal de Ajuda — sem ícone flutuante.
 *   1 - ImplyDesk  (SDK; launcher oculto, aberto por clique programático)
 *   3 - DeskManager (janela de chat fixa)
 *   4 - Imply AI   (janela de iframe fixa)
 * ========================================================================== */

/* --- ImplyDesk (SDK): oculta o launcher flutuante mantendo-o clicável via JS --- */
#sac-imply-widget {
    opacity: 0 !important;
    pointer-events: none !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Corrige estilos globais que vazam para dentro do widget do SDK */
#sac-imply-desk-content input,
#sac-imply-desk-content select,
#sac-imply-desk-content textarea,
.sac-textfield {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* --- Botão de fechar das janelas de chat (DeskManager / Imply AI) --- */
.sac-chat-close {
    position: absolute;
    top: 6px;
    right: 10px;
    z-index: 2;
    width: 28px;
    height: 28px;
    line-height: 26px;
    text-align: center;
    font-size: 22px;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
}

/* --- DeskManager Widget (janela de chat) --- */
#sac-dm-chat {
    border-radius: 5px;
    position: fixed;
    border: 1px ridge;
    width: 400px;
    bottom: 20px;
    height: 500px;
    right: 15px;
    max-width: 94%;
    z-index: 99 !important;
    display: none;
    background: #fff;
}

#sac-dm-chat #webchat {
    width: 100%;
    height: 100%;
}

/* protegendo estilos globais de quebrarem o chat */
#sac-dm-chat #webchat header {
    position: static !important;
    top: auto !important;
    display: block !important;
}

/* --- Imply AI Widget (janela de iframe) --- */
#sac-ai-chat {
    border-radius: 12px;
    position: fixed;
    border: 1px solid #e0e0e0;
    width: 380px;
    bottom: 20px;
    height: 520px;
    right: 15px;
    max-width: 94%;
    z-index: 99 !important;
    display: none;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

#sac-ai-chat iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}
