body, html {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
}

.container {
    display: flex;
    height: 100%;
}

.sidebar {
    width: 30%;
    background-color: #f0f0f0;
    padding: 20px;
    overflow-y: auto;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar li {
    background-color: #ffffff;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.sidebar li:hover {
    background-color: #e0e0e0;
}

.sidebar .name {
    font-weight: bold;
    display: block;
}

.sidebar .phone {
    display: block;
    margin-top: 5px;
}

.sidebar .last-message {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

.chat-header {
    background-color: #007bff;
    color: #fff;
    padding: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

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

.message-left, .message-right {
    max-width: 70%;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

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

.message-right {
    background-color: #d4edda;
    align-self: flex-end;
    text-align: right;
}

.chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc;
}

#messageInput {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
}

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