/* ==== Chat layout & messages ==== */
.chat-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    margin-top: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

#messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    padding: 10px;
}

#messages li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    width: 100%;
}

#messages li:last-child {
    border-bottom: none;
}

#chatForm {
    display: flex;
    gap: 10px;
}

#chatInput {
    flex-grow: 1;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

#chatForm button {
    padding: 10px 20px;
    border: none;
    background: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

#chatForm button:hover {
    background: #0056b3;
}

.message-timestamp {
    display: block;
    font-size: 0.8rem;
    color: rgb(6, 6, 6);
    margin-top: 5px;
}

.message {
    display: inline-block;
    width: fit-content;
    max-width: 70%;
    min-width: 40px;
    padding: 10px;
    border-radius: 10px;
    margin: 5px 0;
    position: relative;
    word-wrap: break-word;
    word-break: break-word;
    clear: both;
}

.message-left {
    background-color: #e9ecef;
    align-self: flex-start;
}

.message-right {
    background-color: #007bff;
    color: white;
    align-self: flex-end;
}

.chat-textarea {
    resize: none;
    min-height: 40px;
    line-height: 1.375;
}

#message-form .btn {
    align-self: flex-end;
}
