/* Base reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: sans-serif;
    background-color: #f4f7fb;
}

/* Layout */
.inbox-wrapper {
    display: flex;
    flex-direction: row;
    height: 100vh;
}

.contact-list {
    width: 300px;
    background: #fff;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    padding: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-item:hover {
    background-color: #f0f0f0;
}

.contact-item.selected {
    background-color: #e0e0e0;
}

.contact-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
}

.contact-name {
    flex: 1;
    font-weight: bold;
}

.badge {
    background: #ff3b3b;
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
}

/* Chat area */
.conversation-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.conversation-header {
    padding: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.platform-icon {
    width: 28px;
    height: 28px;
    margin-right: 10px;
}

.conversation-header .contact-name,
.conversation-header .platform-name {
    font-size: 16px;
    font-weight: bold;
}

/* Thread */
.conversation-thread {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
}

.message {
    max-width: 70%;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 15px;
    position: relative;
    word-break: break-word;
}

.message.incoming {
    background: #e0e0e0;
    align-self: flex-start;
}

.message.outgoing {
    background: #007bff;
    color: #fff;
    align-self: flex-end;
    text-align: right;
}

.message-time {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
}

/* Input */
.message-input-wrapper {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #ddd;
    background: #fff;
}

.message-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.send-message-btn,
.mic-btn,
.attach-btn {
    background: transparent;
    border: none;
    margin-left: 10px;
    font-size: 18px;
    cursor: pointer;
    color: #007bff;
}

.send-message-btn:hover,
.mic-btn:hover,
.attach-btn:hover {
    color: #0056b3;
}

/* Responsive Layout */
@media (max-width: 768px) {
    .inbox-wrapper {
        flex-direction: column;
    }

    .contact-list {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .conversation-wrapper {
        flex: 1;
    }

    .message {
        max-width: 90%;
    }
}