.whatsapp-container {
    height: 100vh;
    background-color: #e5ddd5;
    background-image: url('https://web.whatsapp.com/img/bg-chat-tile-light_a4be512e7195b6b733d9110b408f075d.png');
    /*padding: 0;*/
}

.conversas-container {
    background-color: #fff;
    border-right: 1px solid #e9edef;
    height: 100vh;
    padding: 0;
}

/* 1) Padding global no container + altura compensada */
.chat-container {
  padding: 20px;             /* padding em todos os lados */
  box-sizing: border-box;    /* padding conta dentro do tamanho */
  height: calc(100vh - 40px);/* compensa padding vertical (20+20) */
  display: flex;
  flex-direction: column;
  background-color: #e5ddd5;
  overflow: hidden;          /* mantém seu comportamento atual */
}

/* 2) Neutraliza as margens negativas do .row dentro do container */
.chat-container > .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* 3) Evita que os gutters recolocados “comam” o padding lateral */
.chat-container > .row > [class*="col-"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 4) Tudo que usava 100vh precisa descontar o padding global (40px) */
.sidebar,
.chat-area {
  height: calc(100vh - 40px);
}

.conversas-list {
    height: calc(100vh - 61px - 40px);
    overflow-y: auto;
    box-sizing: border-box;
}

.conversas-header, .chat-header {
    background-color: #f0f2f5;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9edef;
}

.user-info, .contato-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info img, .contato-info img {
    width: 40px;
    height: 40px;
}

.conversa-item {
    display: flex;
    padding: 10px 15px;
    border-bottom: 1px solid #e9edef;
    text-decoration: none;
    color: inherit;
    align-items: center;
    gap: 15px;
}

.conversa-item:hover {
    background-color: #f5f6f6;
}

.conversa-item img {
    width: 50px;
    height: 50px;
}

.conversa-info {
    flex: 1;
    overflow: hidden;
}


.conversa-ultima-msg {
    font-size: 0.8rem;
    color: #667781;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversa-hora {
    font-size: 0.7rem;
    color: #667781;
}

.chat-mensagens {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-image: url('https://web.whatsapp.com/img/bg-chat-tile-light_a4be512e7195b6b733d9110b408f075d.png');
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mensagem {
    display: flex;
    max-width: 70%;
    gap: 8px;
}

.mensagem img {
    width: 30px;
    height: 30px;
    align-self: flex-end;
}

.mensagem-conteudo {
    display: flex;
    flex-direction: column;
}

.mensagem-texto {
    padding: 8px 12px;
    border-radius: 7.5px;
    position: relative;
    word-wrap: break-word;
}

.mensagem-hora {
    font-size: 0.7rem;
    color: #667781;
    text-align: right;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.mensagem.recebida .mensagem-texto {
    background-color: #fff;
    border-top-left-radius: 0;
}

.mensagem.enviada {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.mensagem.enviada .mensagem-texto {
    background-color: #d9fdd3;
    border-top-right-radius: 0;
}

.chat-input {
    background-color: #f0f2f5;
    padding: 10px 15px;
}

.chat-empty {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    color: #667781;
}

.chat-empty i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f2f5;
    flex-direction: column;
}

.login-box {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
    color: #25D366;
}

.login-logo i {
    font-size: 3rem;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    color: #667781;
}

.chat-container {
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    background-color: #f8f9fa;
    border-right: 1px solid #ddd;
    padding: 0;
}

.conversas-header img {
    object-fit: cover;
}

.conversas-list a.active {
    background-color: #e9ecef;
}

.chat-area {
    background-color: #fff;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    overflow-y: auto;
}

.message {
    max-width: 75%;
    padding: 10px 15px;
    border-radius: 15px;
    word-wrap: break-word;
    display: block;
}

/* Alinha à direita (mensagem enviada pelo usuário) */
.message-sent {
    align-self: flex-end;
    background-color: #d1e7dd;
    text-align: right;
}

/* Alinha à esquerda (mensagem recebida) */
.message-received {
    align-self: flex-start;
    background-color: #ffffff;
    border: 1px solid #ddd;
}



.message-time {
    font-size: 0.75rem;
    margin-top: 5px;
}

.chat-input {
    background-color: #fff;
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .chat-area {
        flex: 1;
        padding: 0;
    }
}
.list-group-item.active {
    color: #000 !important;
}
.conversa-nao-lida {
  background-color: #eef6ee; /* leve destaque */
}
.conversa-nao-lida:hover {
  background-color: #e6f3e6;
}

/* Textarea auto-ajustável e com quebra de linha */
#inputMensagem {
  max-height: 150px;    /* limite de crescimento */
  overflow-y: auto;     /* rola se passar do limite */
  resize: none;         /* evita redimensionamento manual */
  line-height: 1.4;
  white-space: pre-wrap; /* respeita \n e quebra longa */
  word-wrap: break-word;
}
