/* Correção pontual do Chat Interno.
   Mantém a rolagem dentro dos painéis e estiliza o textarea usado para responder mensagens. */
.chat-body {
    height: min(560px, calc(100vh - 190px));
    min-height: 390px;
    overflow: hidden;
}

.chat-conversations-list,
.chat-messages-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #e2e8f0;
}

.chat-conversations-list::-webkit-scrollbar,
.chat-messages-list::-webkit-scrollbar {
    width: 9px;
}

.chat-conversations-list::-webkit-scrollbar-track,
.chat-messages-list::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 999px;
}

.chat-conversations-list::-webkit-scrollbar-thumb,
.chat-messages-list::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 999px;
}

.chat-messages-panel {
    min-width: 0;
    overflow: hidden;
}

.chat-send-form textarea,
.chat-send-form input {
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    padding: 0.48rem 0.6rem;
    outline: none;
    font-size: 0.83rem;
    resize: none;
    min-height: 42px;
}

@media (max-width: 820px) {
    .chat-body {
        height: auto;
        max-height: calc(100vh - 230px);
    }
}
