ai-agent-backend / frontend /src /components /MessageBubble.css
Hamza4100's picture
Upload 33 files
bbee504 verified
/* MessageBubble Component Styles */
.message-bubble {
margin: 12px 0;
padding: 12px 16px;
border-radius: 8px;
max-width: 85%;
word-wrap: break-word;
animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* User Messages */
.message-bubble.user-message {
background-color: #007bff;
color: white;
margin-left: auto;
border-bottom-right-radius: 4px;
}
/* Agent Messages */
.message-bubble.agent-message {
background-color: #f0f0f0;
color: #333;
margin-right: auto;
border-bottom-left-radius: 4px;
}
/* Tool Call Messages */
.message-bubble.tool-call {
background-color: #fff3cd;
color: #856404;
border-left: 4px solid #ffc107;
margin-right: auto;
}
/* Tool Result Messages */
.message-bubble.tool-result {
background-color: #d1ecf1;
color: #0c5460;
border-left: 4px solid #17a2b8;
margin-right: auto;
}
/* Final Response Messages */
.message-bubble.final-response {
background-color: #d4edda;
color: #155724;
border-left: 4px solid #28a745;
margin-right: auto;
}
/* Message Header */
.message-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
font-size: 0.85rem;
font-weight: 600;
opacity: 0.8;
}
.message-type {
font-weight: 700;
}
.message-time {
font-size: 0.75rem;
opacity: 0.7;
margin-left: 8px;
}
/* Message Content */
.message-text {
line-height: 1.4;
white-space: pre-wrap;
word-break: break-word;
}
/* Tool Call Styling */
.tool-call-content {
display: flex;
flex-direction: column;
gap: 8px;
}
.tool-label {
font-weight: 600;
font-size: 0.9rem;
}
.tool-params {
background-color: rgba(0, 0, 0, 0.1);
padding: 8px;
border-radius: 4px;
font-family: "Courier New", monospace;
font-size: 0.85rem;
overflow-x: auto;
}
.tool-params pre {
margin: 0;
padding: 0;
font-size: 0.85rem;
}
/* Tool Result Styling */
.tool-result-content {
display: flex;
flex-direction: column;
gap: 8px;
}
.tool-output {
background-color: rgba(0, 0, 0, 0.08);
padding: 8px;
border-radius: 4px;
font-family: "Courier New", monospace;
font-size: 0.85rem;
max-height: 200px;
overflow-y: auto;
white-space: pre-wrap;
word-break: break-word;
}
/* Responsive Design */
@media (max-width: 600px) {
.message-bubble {
max-width: 98%;
}
.message-header {
flex-direction: column;
align-items: flex-start;
}
.message-time {
margin-left: 0;
margin-top: 4px;
}
}