/* Agent Iframe Styles - styles.css */
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background-color: #f8f9fa;
height: 100vh;
overflow: hidden;
}
.agent-container {
display: flex;
flex-direction: column;
height: 100vh;
}
.agent-header {
background: linear-gradient(135deg, #007bff, #0056b3);
color: white;
padding: 12px 15px;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
flex-shrink: 0;
gap: 10px;
}
.agent-header h2 {
margin: 0;
font-size: 15px;
font-weight: 600;
flex-shrink: 0;
}
.status-indicator {
display: flex;
align-items: center;
font-size: 12px;
flex-shrink: 1;
min-width: 60px;
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 6px;
background-color: #28a745;
transition: background-color 0.3s ease;
}
.status-indicator.thinking .status-dot {
background-color: #ffc107;
animation: pulse 1s infinite;
}
.status-indicator.executing .status-dot {
background-color: #17a2b8;
animation: pulse 1s infinite;
}
.status-indicator.error .status-dot {
background-color: #dc3545;
}
.status-indicator.connected .status-dot {
background-color: #28a745;
}
@keyframes pulse {
0% {
opacity: 1;
transform: scale(1);
}
50% {
opacity: 0.5;
transform: scale(1.1);
}
100% {
opacity: 1;
transform: scale(1);
}
}
.chat-container {
flex: 1;
overflow-y: auto;
padding: 20px;
display: flex;
flex-direction: column;
gap: 15px;
background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}
.welcome-message {
background: linear-gradient(135deg, #e3f2fd, #bbdefb);
border: 1px solid #2196f3;
border-radius: 12px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
border-left: 4px solid #2196f3;
}
.welcome-message p {
margin: 0 0 12px 0;
color: #1565c0;
line-height: 1.5;
}
.welcome-message p:last-child {
margin-bottom: 0;
}
.message {
max-width: 85%;
margin-bottom: 15px;
animation: slideIn 0.3s ease-out;
position: relative;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.user-message {
align-self: flex-end;
margin-left: auto;
}
.user-message .message-content {
background: linear-gradient(135deg, #007bff, #0056b3);
color: white;
padding: 12px 16px;
border-radius: 18px 18px 4px 18px;
word-wrap: break-word;
box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
position: relative;
}
.user-message .message-content::after {
content: '';
position: absolute;
bottom: 0;
right: -8px;
width: 0;
height: 0;
border: 8px solid transparent;
border-left-color: #0056b3;
border-bottom: 0;
margin-bottom: -8px;
}
.assistant-message {
align-self: flex-start;
}
.assistant-message .message-content {
background: white;
color: #333;
padding: 12px 16px;
border-radius: 18px 18px 18px 4px;
border: 1px solid #e9ecef;
word-wrap: break-word;
white-space: pre-wrap;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
position: relative;
line-height: 1.5;
}
.assistant-message .message-content::after {
content: '';
position: absolute;
bottom: 0;
left: -8px;
width: 0;
height: 0;
border: 8px solid transparent;
border-right-color: white;
border-bottom: 0;
margin-bottom: -8px;
}
.system-message {
align-self: center;
max-width: 90%;
}
.system-message .message-content {
background: linear-gradient(135deg, #f8f9fa, #e9ecef);
color: #6c757d;
padding: 10px 16px;
border-radius: 20px;
border: 1px solid #dee2e6;
text-align: center;
font-size: 13px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
font-weight: 500;
}
/* Typing indicator */
.typing-indicator {
display: flex;
align-items: center;
padding: 12px 16px;
background: white;
border-radius: 18px 18px 18px 4px;
border: 1px solid #e9ecef;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
margin-bottom: 15px;
}
.typing-dots {
display: flex;
gap: 4px;
}
.typing-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background-color: #6c757d;
animation: typing 1.4s infinite;
}
.typing-dot:nth-child(2) {
animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes typing {
0%, 60%, 100% {
transform: translateY(0);
opacity: 0.5;
}
30% {
transform: translateY(-10px);
opacity: 1;
}
}
.input-container {
padding: 20px;
background: white;
border-top: 1px solid #dee2e6;
display: flex;
gap: 12px;
align-items: center;
flex-shrink: 0;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}
#userInput {
flex: 1;
padding: 14px 18px;
border: 2px solid #e9ecef;
border-radius: 25px;
font-size: 14px;
outline: none;
transition: all 0.3s ease;
background: #f8f9fa;
}
#userInput:focus {
border-color: #007bff;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
background: white;
}
#userInput::placeholder {
color: #6c757d;
font-style: italic;
}
#sendButton {
padding: 14px 20px;
background: linear-gradient(135deg, #007bff, #0056b3);
color: white;
border: none;
border-radius: 25px;
cursor: pointer;
font-size: 14px;
font-weight: 600;
transition: all 0.3s ease;
box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
min-width: 80px;
}
#sendButton:hover {
background: linear-gradient(135deg, #0056b3, #004085);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}
#sendButton:active {
transform: translateY(0);
}
#sendButton:disabled {
background: #6c757d;
cursor: not-allowed;
transform: none;
box-shadow: none;
}
/* Enhanced scrollbar styling */
.chat-container::-webkit-scrollbar {
width: 8px;
}
.chat-container::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 4px;
}
.chat-container::-webkit-scrollbar-thumb {
background: linear-gradient(to bottom, #c1c1c1, #a8a8a8);
border-radius: 4px;
transition: background 0.3s ease;
}
.chat-container::-webkit-scrollbar-thumb:hover {
background: linear-gradient(to bottom, #a8a8a8, #909090);
}
/* Success/Error message styling */
.success-message {
color: #28a745;
font-weight: 500;
}
.error-message {
color: #dc3545;
font-weight: 500;
}
/* Tool execution indicators */
.tool-indicator {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 8px;
background: #e3f2fd;
border-radius: 12px;
font-size: 11px;
color: #1565c0;
font-weight: 500;
margin: 4px 0;
}
.tool-indicator.executing {
background: #fff3cd;
color: #856404;
}
.tool-spinner {
width: 12px;
height: 12px;
border: 2px solid transparent;
border-top: 2px solid currentColor;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Mobile responsiveness */
@media (max-width: 480px) {
.agent-header {
padding: 8px 12px;
gap: 8px;
}
.agent-header h2 {
font-size: 14px;
}
.llm-selector {
gap: 4px;
font-size: 11px;
}
.llm-selector select {
min-width: 70px;
max-width: 80px;
font-size: 11px;
padding: 3px 6px;
}
.llm-selector button {
font-size: 10px;
padding: 3px 6px;
}
.status-indicator {
font-size: 10px;
}
.chat-container {
padding: 15px;
}
.message {
max-width: 90%;
}
.input-container {
padding: 15px;
}
#userInput {
padding: 12px 16px;
font-size: 16px; /* Prevents zoom on iOS */
}
#sendButton {
padding: 12px 16px;
min-width: 70px;
}
}
/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
body {
background-color: #1a1a1a;
color: #ffffff;
}
.chat-container {
background: linear-gradient(to bottom, #1a1a1a 0%, #2d2d2d 100%);
}
.assistant-message .message-content {
background: #2d2d2d;
color: #ffffff;
border-color: #404040;
}
.system-message .message-content {
background: linear-gradient(135deg, #2d2d2d, #404040);
color: #cccccc;
border-color: #404040;
}
.input-container {
background: #2d2d2d;
border-top-color: #404040;
}
#userInput {
background: #404040;
border-color: #555555;
color: #ffffff;
}
#userInput:focus {
background: #4a4a4a;
}
#userInput::placeholder {
color: #888888;
}
}
/* Animation for message appearance */
.message.new {
animation: messageAppear 0.5s ease-out;
}
@keyframes messageAppear {
0% {
opacity: 0;
transform: translateY(20px) scale(0.95);
}
100% {
opacity: 1;
transform: translateY(0) scale(1);
}
}
/* Loading states */
.loading {
opacity: 0.7;
pointer-events: none;
}
.shimmer {
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
0% {
background-position: -200% 0;
}
100% {
background-position: 200% 0;
}
}
/* LLM Selector Styles */
.llm-selector {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
white-space: nowrap;
flex-shrink: 0;
}
.llm-selector label {
font-weight: 500;
margin: 0;
font-size: 12px;
}
.llm-selector select {
padding: 3px 6px;
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 4px;
background: rgba(255, 255, 255, 0.1);
color: white;
font-size: 11px;
min-width: 80px;
max-width: 100px;
}
.llm-selector select option {
background: #333;
color: white;
}
.llm-selector button {
padding: 3px 6px;
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 4px;
background: rgba(255, 255, 255, 0.1);
color: white;
font-size: 10px;
cursor: pointer;
transition: background-color 0.2s ease;
white-space: nowrap;
}
.llm-selector button:hover {
background: rgba(255, 255, 255, 0.2);
}
/* Configuration Modal Styles */
.config-modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
}
.config-modal-content {
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
max-width: 400px;
width: 90%;
}
.config-modal h3 {
margin: 0 0 15px 0;
color: #333;
}
.config-form-group {
margin-bottom: 15px;
}
.config-form-group label {
display: block;
margin-bottom: 5px;
font-weight: 500;
color: #555;
}
.config-form-group input {
width: 100%;
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
box-sizing: border-box;
}
.config-buttons {
display: flex;
gap: 10px;
justify-content: flex-end;
margin-top: 20px;
}
.config-buttons button {
padding: 8px 16px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
}
.config-buttons .save-btn {
background: #007bff;
color: white;
}
.config-buttons .cancel-btn {
background: #6c757d;
color: white;
}
.config-buttons button:hover {
opacity: 0.9;
}