/* General Chat Container */
#rectangle {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: .25rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
    height: 90vh; /* Make it responsive to viewport height */
    max-height: 700px;
    width: 280px;
    position: fixed;
    right: 20px;
    top: 60px;
}

/* Chat Header */
#rectangle > div:first-child {
    font-weight: bold;
    padding: .5rem 1rem;
    background-color: #343a40;
    color: white;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: .25rem;
    border-top-right-radius: .25rem;
}

#chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px;
}

/* Messages Area */
.tbodyDiv {
    overflow-y: auto;
    padding: 0 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: calc(100% - 130px); /* Adjust based on input/button height */
}

.chat-message {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.chat-message:last-child {
    border-bottom: none;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.author {
    font-weight: bold;
    color: #333;
}

.time {
    font-size: 0.8em;
    color: #999;
}

.message-text {
    line-height: 1.4;
    color: #555;
}

.chat-footer {
    padding-top: 10px;
}

/* Input Area */
#message {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    margin-top: 5px;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

.button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 5px;
    font-size: 16px;
}

.button:hover {
    background-color: #0056b3;
}
