<div class="chat-wrapper">
<div class="message received">
<div class="bubble">Hello! How can I help you today?</div>
<span class="time">10:00 AM</span>
</div>
<div class="message sent">
<div class="bubble">I have a question about my order.</div>
<span class="time">10:02 AM</span>
</div>
<div class="message received">
<div class="bubble">Sure, please provide your order ID.</div>
<span class="time">10:03 AM</span>
</div>
</div>
.chat-wrapper {
font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
display: flex;
flex-direction: column;
gap: 15px;
max-width: 400px;
padding: 20px;
background: #f9fafb;
border-radius: 16px;
}
.message {
display: flex;
flex-direction: column;
max-width: 80%;
}
.message.received {
align-self: flex-start;
}
.message.sent {
align-self: flex-end;
align-items: flex-end;
}
.bubble {
padding: 12px 16px;
border-radius: 12px;
font-size: 0.95rem;
line-height: 1.4;
position: relative;
}
.received .bubble {
background: #e5e7eb;
color: #1f2937;
border-bottom-left-radius: 2px;
}
.sent .bubble {
background: #3b82f6;
color: white;
border-bottom-right-radius: 2px;
}
.time {
font-size: 0.7rem;
color: #9ca3af;
margin-top: 4px;
}