/* whatsapp-styles.css */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    background-color: #f9f9f9;
}

.chat-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

.sidebar {
    width: 300px; /* Fixed width for sidebar */
    background-color: #246C96;
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 1rem;
    text-align: center;
    font-size: 1.5rem;
    background-color: #1b5570;
}

.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
}

.contact-item {
    padding: 1rem;
    border-bottom: 1px solid #1b5570;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-item:hover {
    background-color: #1b5570;
}

.contact-item h4 {
    margin: 0;
    font-size: 1.2rem;
}

.contact-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #e0e0e0;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
}

.chat-header {
    padding: 1rem;
    background-color: #f1f1f1;
    border-bottom: 1px solid #ddd;
    text-align: center;
    font-size: 1.2rem;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.message {
    margin: 0.5rem 0;
    padding: 0.8rem;
    border-radius: 8px;
    max-width: 70%;
    display: inline-block;
}

.message.sent {
    background-color: #d1f7c4;
    align-self: flex-end;
}

.message.received {
    background-color: #f1f1f1;
    align-self: flex-start;
}

.chat-input {
    display: flex;
    padding: 1rem;
    background-color: #f1f1f1;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.chat-input button {
    background-color: #246C96;
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.chat-input button:hover {
    background-color: #1b5570;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%; /* Full width on smaller screens */
        height: auto; /* Allow height to adjust */
    }

    .chat-area {
        width: 100%;
        height: 100vh; /* Make chat area fill height */
    }
}
