/* Estilos do Cabeçalho */
.chat-header {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border-radius: 9px 9px 0 0; /* Borda um pouco menos arredondada */
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-header-title {
    font-weight: bold;
}
.chat-header-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

/* Container das Mensagens */
.chat-mensagens {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: #efeae2;
}
.chat-mensagens::-webkit-scrollbar { width: 6px; }
.chat-mensagens::-webkit-scrollbar-thumb { background: #b0b0b0; border-radius: 3px; }
.chat-mensagens::-webkit-scrollbar-track { background: #efeae2; }

/* Separador de Data */
.chat-separador-data {
    align-self: center;
    background-color: #e1f2fb;
    color: #597381;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 5px 12px;
    border-radius: 12px;
    margin: 8px 0;
}

/* Linha e Balão da Mensagem */
.linha-mensagem {
    display: flex;
}
.mensagem {
    position: relative;
    padding: 6px 12px 8px 12px;
    border-radius: 12px;
    max-width: 75%;
    word-wrap: break-word;
    line-height: 1.45;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
    display: inline-block;
}
.minha-mensagem {
    background-color: #d9fdd3;
    color: #0b1b0f;
    margin-left: auto;
}
.outra-mensagem {
    background-color: #ffffff;
    color: #111;
    margin-right: auto;
}

/* Conteúdo e Hora da Mensagem - AQUI ESTÁ A CORREÇÃO PRINCIPAL */
.mensagem-conteudo {
    padding-right: 55px; /* CRÍTICO: Abre espaço para a hora */
    white-space: pre-wrap; /* Garante quebras de linha */
}
.mensagem-hora {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 0.7rem;
    font-weight: 300; /* Deixa a fonte um pouco mais cheia */
    color: #ffffff;      /* Cor bem mais escura para o balão branco */
    opacity: 0.8;
}
.minha-mensagem .mensagem-hora {
    color: #ffffff;  /* Tom de verde escuro para o balão verde */
}

/* Formulário de Envio */
.chat-form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-top: 1px solid #ddd;
    background-color: #f0f2f5;
}
.chat-input {
    flex-grow: 1;
    padding: 10px 16px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 1rem;
}
.chat-input:focus {
    outline: none;
    border-color: #888;
}
.chat-submit-button {
    background-color: #00a884;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s;
}
.chat-submit-button:hover {
    background-color: #008c6e;
}
.chat-submit-button svg {
    fill: white;
    width: 24px;
    height: 24px;
}