chatbot / static /style.css
Moderator404's picture
Upload 38 files
a5778f2 verified
Raw
History Blame
8.95 kB
/* Reset and base styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
line-height: 1.6;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* Header */
header {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 15px;
padding: 20px 30px;
margin-bottom: 20px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
display: flex;
justify-content: space-between;
align-items: center;
}
header h1 {
color: #333;
font-size: 2.2em;
font-weight: 700;
}
.status-indicator {
display: flex;
align-items: center;
gap: 10px;
font-weight: 500;
}
.status-dot {
width: 12px;
height: 12px;
border-radius: 50%;
background: #ffa500;
animation: pulse 2s infinite;
}
.status-dot.connected {
background: #4caf50;
animation: none;
}
.status-dot.error {
background: #f44336;
animation: none;
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
/* Main content */
.main-content {
display: grid;
grid-template-columns: 300px 1fr;
gap: 20px;
flex: 1;
min-height: 0;
}
/* Agent panel */
.agent-panel {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 15px;
padding: 25px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
height: fit-content;
}
.agent-panel h3 {
color: #333;
margin-bottom: 15px;
font-size: 1.3em;
}
.agent-info {
display: flex;
flex-direction: column;
gap: 10px;
}
.agent-info p {
color: #666;
font-size: 14px;
margin: 5px 0;
}
.agent-info p strong {
color: #333;
min-width: 80px;
display: inline-block;
}
.agent-description {
margin-top: 15px;
padding: 15px;
background: #f8f9ff;
border-radius: 10px;
border-left: 4px solid #667eea;
font-style: italic;
}
#agent-status {
font-weight: 500;
}
#agent-status.ready {
color: #28a745;
}
#agent-status.error {
color: #dc3545;
}
#agent-status.connecting {
color: #ffc107;
}
/* Chat container */
.chat-container {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 15px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
display: flex;
flex-direction: column;
overflow: hidden;
}
.chat-header {
padding: 20px 25px;
border-bottom: 1px solid #e0e0e0;
display: flex;
justify-content: space-between;
align-items: center;
background: rgba(255, 255, 255, 0.8);
}
.chat-header h3 {
color: #333;
font-size: 1.3em;
}
.clear-btn {
padding: 8px 15px;
background: #f44336;
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 14px;
transition: all 0.3s ease;
}
.clear-btn:hover {
background: #d32f2f;
transform: translateY(-2px);
}
/* Chat messages */
.chat-messages {
flex: 1;
padding: 20px;
overflow-y: auto;
max-height: 500px;
min-height: 400px;
}
.welcome-message {
text-align: center;
color: #666;
margin-top: 50px;
}
.welcome-message h4 {
color: #333;
margin-bottom: 15px;
font-size: 1.4em;
}
.welcome-message ul {
text-align: left;
max-width: 400px;
margin: 20px auto 0;
}
.welcome-message li {
margin: 8px 0;
}
.message {
margin: 15px 0;
display: flex;
align-items: flex-start;
gap: 12px;
opacity: 0;
animation: messageSlideIn 0.3s ease forwards;
}
@keyframes messageSlideIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.message.user {
flex-direction: row-reverse;
}
.message-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
flex-shrink: 0;
}
.message.user .message-avatar {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
}
.message.bot .message-avatar {
background: linear-gradient(135deg, #4caf50, #45a049);
color: white;
}
.message-content {
max-width: 70%;
padding: 15px 20px;
border-radius: 20px;
position: relative;
}
.message.user .message-content {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
border-bottom-right-radius: 5px;
}
.message.bot .message-content {
background: #f8f9ff;
border: 1px solid #e0e0e0;
color: #333;
border-bottom-left-radius: 5px;
}
.message-text {
margin: 0;
word-wrap: break-word;
}
.message-time {
font-size: 11px;
opacity: 0.7;
margin-top: 5px;
}
/* Chat input */
.chat-input-container {
padding: 20px;
border-top: 1px solid #e0e0e0;
background: rgba(255, 255, 255, 0.8);
}
.input-group {
display: flex;
gap: 15px;
align-items: flex-end;
flex-wrap: wrap;
}
#message-input {
flex: 1;
padding: 15px 20px;
border: 2px solid #e0e0e0;
border-radius: 25px;
font-size: 14px;
font-family: inherit;
resize: none;
transition: all 0.3s ease;
background: white;
}
#message-input:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}
#message-input:disabled {
background: #f5f5f5;
color: #999;
cursor: not-allowed;
}
#send-btn {
padding: 15px 25px;
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
border: none;
border-radius: 25px;
cursor: pointer;
font-size: 14px;
font-weight: 600;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 8px;
min-width: 100px;
justify-content: center;
}
#send-btn:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
#send-btn:disabled {
background: #ccc;
cursor: not-allowed;
transform: none;
box-shadow: none;
}
.action-button {
padding: 10px 15px;
border: 2px solid #667eea;
background: transparent;
color: #667eea;
border-radius: 20px;
cursor: pointer;
font-size: 12px;
font-weight: 600;
transition: all 0.3s ease;
margin-left: 10px;
}
.action-button:hover {
background: #667eea;
color: white;
transform: translateY(-1px);
}
.action-button.end-conversation {
border-color: #e74c3c;
color: #e74c3c;
background: #ffebee;
font-weight: bold;
padding: 12px 20px;
}
.action-button.end-conversation:hover {
background: #e74c3c;
color: white;
}
.send-icon {
font-size: 16px;
}
.input-info {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10px;
font-size: 12px;
color: #666;
}
.divider {
margin: 0 10px;
}
/* Loading overlay */
.loading-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.loading-overlay.hidden {
display: none;
}
.loading-spinner {
background: white;
padding: 30px;
border-radius: 15px;
text-align: center;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.spinner {
width: 40px;
height: 40px;
border: 4px solid #f3f3f3;
border-top: 4px solid #667eea;
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto 15px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Responsive design */
@media (max-width: 768px) {
.container {
padding: 10px;
}
.main-content {
grid-template-columns: 1fr;
gap: 15px;
}
.agent-panel {
order: 2;
}
.chat-container {
order: 1;
}
header {
padding: 15px 20px;
flex-direction: column;
gap: 15px;
text-align: center;
}
header h1 {
font-size: 1.8em;
}
.chat-messages {
max-height: 300px;
min-height: 250px;
}
.message-content {
max-width: 85%;
}
.input-group {
flex-direction: column;
gap: 10px;
}
#send-btn {
align-self: flex-end;
min-width: 120px;
}
}
/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
width: 6px;
}
.chat-messages::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 3px;
}
.chat-messages::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 3px;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
background: #a8a8a8;
}