
/* Mensageria */

#chatWrapper {
    display: flex;
    flex-direction: column;
    height: 100vh; /* full screen */
}

#pnlHistorico {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 120px; /* space for fixed panel */
}

#pnlOperacoes {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #ccc;
    padding: 8px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ops-top {
    display: flex;
    gap: 6px;
}

.ops-bottom {
    display: flex;
    gap: 6px;
    align-items: center;
}

#txtMensagem {
    flex: 1;
    resize: none;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.preview {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.preview img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

/* Mensageria Histórico */

.msg-table {
    width: 98%;
    border: 1px solid #6D6D6D;
    margin: 8px;
    border-radius: 7px 15px 7px 15px;
    padding: 5px;
    border-collapse: collapse;
    border-spacing: 0;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 16px;
}

.msg-table td,
.msg-table th,
.msg-table tr {
    border: none !important;
}

.msg-out {
    border-width: thin thick thin thin;
    border-right-color: #000080;
}

.msg-in {
    border-width: thin thin thin thick;
    border-left-color: #008080;
}

.msg-header {
    background-color: #F2F2F2;
    vertical-align: middle;
}

.msg-td-left {
    padding: 5px;
    text-align: left;
}

.msg-td-right {
    padding: 5px;
    text-align: right;
}

/* WhatsApp Chat Style */

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
}

.msg {
    width: 95%;
    max-width: 95%;
    padding: 8px 10px;
    border-radius: 10px;
    position: relative;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
    word-wrap: break-word;
}

.msg-in {
    align-self: flex-start;
    background-color: #f1f1f1;
}

.msg-out {
    align-self: flex-end;
    background-color: #dcf8c6;
}

.msg-header {
    font-size: 11px;
    /* color: #555; */
    margin-bottom: 3px;
}

.msg-time {
    font-size: 10px;
    text-align: right;
    color: #888;
    margin-top: 5px;
}

.msg a {
    color: #0645AD;
    text-decoration: underline;
}

.msg-quote {
    border-left: 3px solid #ccc;
    padding-left: 6px;
    margin: 4px 0;
    color: #555;
    font-style: italic;
}

.msg-media img {
    max-width: 200px;
    border-radius: 5px;
    margin-top: 5px;
}

.msg-media audio {
    margin-top: 5px;
    width: 100%;
}

/* Image Modal */

.img-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.img-modal img {
    max-width: 95%;
    max-height: 95%;
    border-radius: 8px;
}

/* Camera Modal */

.camera-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* Voice Waveform */

.wave {
    display: flex;
    gap: 2px;
    margin-top: 5px;
}

.wave span {
    width: 3px;
    height: 10px;
    background: #4caf50;
       /* animation: wave 1s infinite ease-in-out; */
}

/*
.wave span:nth-child(2) {
    animation-delay: 0.1s;
}

.wave span:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes wave {
    0%,100% {
        height: 5px;
    }

    50% {
        height: 15px;
    }
}
*/


/* Contatos */

#dlgEditaUsuario {
    border: none;
    border-radius: 8px;
    padding: 0;
    max-height: 92vh;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .25);
}

    #dlgEditaUsuario::backdrop {
        background: rgba(0, 0, 0, .45);
    }

.dlg-edit-header {
    padding: 1rem 1.5rem .5rem;
    border-bottom: 1px solid #ddd;
}

    .dlg-edit-header h2 {
        margin: 0;
        font-size: 1.2rem;
    }

.dlg-edit-body {
    overflow-y: auto;
    padding: 1rem 1.5rem;
    flex: 1;
}

.dlg-section-title {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin: 1.25rem 0 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #eee;
}

.dlg-section {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.dlg-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 200px;
    min-width: 0;
}

.dlg-field-full {
    flex: 1 1 100%;
}

.dlg-field-sm {
    flex: 0 1 120px;
}

.dlg-field-lg {
    flex: 2 1 300px;
}

.dlg-field-custom {
    flex: 1 1 400px;
}

.dlg-field label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 3px;
}

.dlg-field input[type="text"],
.dlg-field input[type="date"],
.dlg-field select,
.dlg-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
}

.dlg-edit-footer {
    padding: .75rem 1.5rem;
    border-top: 1px solid #ddd;
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
}

.dlg-edit-header,
.dlg-edit-footer {
    flex-shrink: 0;
}

.dlg-edit-body {
    flex-shrink: 1;
}

/* Contatos Select2 */

ul#select2-edit_grupo-results,
ul#select2-edit_pais-results {
    height: 400px !important;
    max-height: 400px !important;
}

.select2-dropdown {
    height: 420px !important;
    max-height: 420px !important;
}

.select2-results {
    height: 400px !important;
    max-height: 400px !important;
}

.select2-results__options {
    height: 400px !important;
    max-height: 400px !important;
}

#dlgEditaUsuario .select2-dropdown {
    height: 420px !important;
    max-height: 420px !important;
}

#dlgEditaUsuario .select2-results {
    height: 380px !important;
    max-height: 380px !important;
    overflow: hidden !important;
}

#dlgEditaUsuario .select2-results__options {
    height: 360px !important;
    max-height: 360px !important;
    overflow-y: auto !important;
}
