/* =====================================================
   LAP CHAT - CHECKS ESTILO WHATSAPP
   ✓ enviado | ✓✓ entregue | ✓✓ azul lido
   ===================================================== */

.chat-msg__receipt {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
    margin-left: 4px !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

/* ícones base */
.chat-msg__receipt svg,
.chat-msg__receipt .fa,
.chat-msg__receipt use[href="#icon-check"] {
    color: #8696a0 !important;
    fill: #8696a0 !important;
}

/* tamanho dos checks */
.chat-msg__receipt svg {
    position: relative !important;
    width: 0.78em !important;
    height: 0.78em !important;
    fill: #8696a0 !important;
}

/* segundo check colado no primeiro */
.chat-msg__receipt svg + svg {
    margin-left: -4px !important;
}

/* 1 check: enviada mas ainda não entregue */
.chat-msg__receipt.lap-single-check svg,
.chat-msg__receipt[data-lap-status="sent"] svg {
    color: #8696a0 !important;
    fill: #8696a0 !important;
}

/* 2 checks cinza: entregue */
.chat-msg__receipt[data-lap-status="delivered"] svg,
.chat-msg__receipt.received svg,
.chat-msg__receipt.delivered svg {
    color: #00a884 !important;
    fill: #00a884 !important;
}

/* 2 checks azul: lida */
.chat-msg__receipt[data-lap-status="read"] svg,
.chat-msg__receipt.read svg,
.chat-msg__receipt.displayed svg {
    color: #53bdeb !important;
    fill: #53bdeb !important;
}

/* força qualquer svg interno do converse-icon a respeitar a cor */
.chat-msg__receipt[data-lap-status="read"] svg use,
.chat-msg__receipt.read svg use,
.chat-msg__receipt.displayed svg use {
    color: #53bdeb !important;
    fill: #53bdeb !important;
}

/* força o check entregue a ficar verde também no <use> interno */
.chat-msg__receipt[data-lap-status="delivered"] svg,
.chat-msg__receipt[data-lap-status="delivered"] svg use,
.chat-msg__receipt.delivered svg,
.chat-msg__receipt.delivered svg use,
.chat-msg__receipt.received svg,
.chat-msg__receipt.received svg use {
    color: #00a884 !important;
    fill: #00a884 !important;
}

/* =====================================================
   RESPOSTAS ESTILO WHATSAPP
   ===================================================== */

.chat-msg__reply,
.replying {
    border-left: 4px solid #00a884 !important;
    padding-left: 8px !important;
    margin-bottom: 6px !important;
    background: #f0f2f5 !important;
    border-radius: 4px !important;
}
/* =====================================================
   LAP CHAT - CAMPO DE BUSCA DE CONTATOS
   ===================================================== */

#lapContactSearchBox {
    padding: 8px 12px;
    background: #f0f2f5;
    border-bottom: 1px solid #d8dadd;
}

#lapContactSearchInput {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #cfd4d8;
    border-radius: 6px;
    outline: none;
    font-size: 14px;
    background: #fff;
    color: #2b2b2b;
}

#lapContactSearchInput:focus {
    border-color: #008069;
}
#lapContactSearchResults {
    display: none;
    background: #fff;
    border: 1px solid #d8dadd;
    border-radius: 6px;
    margin-top: 6px;
    max-height: 260px;
    overflow-y: auto;
}

.lap-search-result {
    padding: 9px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #263238;
}

.lap-search-result:hover {
    background: #f0f2f5;
}

.lap-search-empty {
    padding: 9px 10px;
    color: #777;
    font-size: 13px;
}
/* =====================================================
   LAP CHAT - BOTÃO DESCONECTAR / TROCAR CONTA
   ===================================================== */

#lapLogoutButton {
    display: block !important;
    width: calc(100% - 24px) !important;
    margin: 8px 12px 10px 12px !important;
    padding: 8px 10px !important;
    border: none !important;
    border-radius: 6px !important;
    background: #1e9652 !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    cursor: pointer !important;
    text-align: center !important;
    z-index: 9999 !important;
}
/* =====================================================
   LAP CHAT - MOBILE
   ===================================================== */

@media (max-width: 768px) {
    html,
    body {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        background: #f0f2f5 !important;
    }

    #conversejs,
    converse-root {
        width: 100vw !important;
        min-width: 0 !important;
        max-width: 100vw !important;
    }

    .login-form,
    converse-login-form,
    #converse-login {
        width: 100% !important;
        max-width: 420px !important;
        margin: 0 auto !important;
        padding: 20px !important;
        box-sizing: border-box !important;
    }

    input,
    button,
    select,
    textarea {
        font-size: 16px !important;
    }

    .brand-heading img,
    img[src="/laplogo.png"] {
        max-width: 240px !important;
        width: 70% !important;
        height: auto !important;
    }
}
@media (max-width: 768px) {

    /* reduz espaço acima do login */
    converse-login-panel,
    .login-container,
    #converse-login {
        padding-top: 20px !important;
        margin-top: 0 !important;
    }

    /* logo menor e mais próxima */
    .brand-heading,
    .brand-logo {
        margin-bottom: 15px !important;
    }

    .brand-heading img,
    .brand-logo img {
        max-width: 220px !important;
        width: 60% !important;
        height: auto !important;
    }
}
@media (max-width: 768px) {

    .chat-head__name,
    .chatbox-title {
        font-size: 16px !important;
        font-weight: 500 !important;
    }
}
@media (max-width: 768px) {

    #conversejs {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    #conversejs > * {
        margin-top: 20px !important;
    }

    img[src*="laplogo"] {
        margin-top: 0 !important;
    }

}
/* =====================================================
   LAP CHAT - LOGIN MOBILE AJUSTADO
   ===================================================== */

@media (max-width: 768px) {

    body:not(.converse-fullscreen) .brand-heading,
    .brand-heading {
        margin-top: -80px !important;
        margin-bottom: 18px !important;
        display: flex !important;
        justify-content: center !important;
    }

    .brand-heading img {
        max-width: 230px !important;
        width: 65% !important;
        height: auto !important;
    }

    #converse-login-jid {
        font-size: 16px !important;
    }

    #converse-login-password {
        font-size: 16px !important;
    }

    #converse-login-jid,
    #converse-login-password {
        height: 44px !important;
    }

    .login-submit,
    button[type="submit"] {
        min-height: 44px !important;
        font-size: 16px !important;
    }
}
