207 lines
4.0 KiB
CSS
207 lines
4.0 KiB
CSS
/* General Body Styling */
|
|
body {
|
|
background-color: #F3F4F6;
|
|
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
color: #111827;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
min-height: 100vh;
|
|
margin: 0;
|
|
}
|
|
|
|
/* Main Chat Container */
|
|
.chat-container {
|
|
width: 100%;
|
|
max-width: 768px;
|
|
height: 90vh;
|
|
max-height: 800px;
|
|
background-color: #FFFFFF;
|
|
border-radius: 0.75rem;
|
|
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Chat Header */
|
|
.chat-header {
|
|
padding: 1rem 1.5rem;
|
|
background: linear-gradient(45deg, #4F46E5, #6366F1);
|
|
color: white;
|
|
border-bottom: 1px solid #E5E7EB;
|
|
text-align: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.chat-header h1 {
|
|
margin: 0;
|
|
font-size: 1.25rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Message List */
|
|
.message-list {
|
|
flex-grow: 1;
|
|
padding: 1.5rem;
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
/* Individual Message Styling */
|
|
.message {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
gap: 0.75rem;
|
|
max-width: 85%;
|
|
animation: fadeIn 0.3s ease-out;
|
|
}
|
|
|
|
.message .avatar {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
background-color: #E5E7EB;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
font-weight: 600;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.message .message-content {
|
|
padding: 0.75rem 1rem;
|
|
border-radius: 0.75rem;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* AI (Bot) Message */
|
|
.message.bot {
|
|
align-self: flex-start;
|
|
}
|
|
|
|
.message.bot .avatar {
|
|
background-color: #4F46E5;
|
|
color: white;
|
|
}
|
|
|
|
.message.bot .message-content {
|
|
background-color: #EEF2FF;
|
|
color: #3730A3;
|
|
border-top-left-radius: 0;
|
|
}
|
|
|
|
/* User Message */
|
|
.message.user {
|
|
align-self: flex-end;
|
|
}
|
|
|
|
.message.user .message-content {
|
|
background-color: #10B981;
|
|
color: white;
|
|
border-top-right-radius: 0;
|
|
}
|
|
.message.user .avatar {
|
|
display: none; /* Hide avatar for user messages for a cleaner look */
|
|
}
|
|
|
|
|
|
/* Input Area */
|
|
.input-area {
|
|
padding: 1rem 1.5rem;
|
|
border-top: 1px solid #E5E7EB;
|
|
background-color: #F9FAFB;
|
|
display: flex;
|
|
gap: 0.75rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.input-area input {
|
|
flex-grow: 1;
|
|
padding: 0.75rem 1rem;
|
|
border: 1px solid #D1D5DB;
|
|
border-radius: 0.375rem;
|
|
font-size: 1rem;
|
|
transition: border-color 0.2s, box-shadow 0.2s;
|
|
}
|
|
|
|
.input-area input:focus {
|
|
outline: none;
|
|
border-color: #4F46E5;
|
|
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
|
|
}
|
|
|
|
.input-area button {
|
|
padding: 0.75rem 1.5rem;
|
|
border: none;
|
|
background-color: #4F46E5;
|
|
color: white;
|
|
border-radius: 0.375rem;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.input-area button:hover {
|
|
background-color: #4338CA;
|
|
}
|
|
|
|
.input-area button:disabled {
|
|
background-color: #A5B4FC;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
#analyze-button {
|
|
width: 100%;
|
|
padding: 1rem;
|
|
border: none;
|
|
background-color: #10B981; /* Emerald Green */
|
|
color: white;
|
|
border-radius: 0.375rem;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
#analyze-button:hover {
|
|
background-color: #059669;
|
|
}
|
|
|
|
/* Typing indicator */
|
|
.typing-indicator {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 5px 0;
|
|
}
|
|
.typing-indicator span {
|
|
height: 8px;
|
|
width: 8px;
|
|
float: left;
|
|
margin: 0 2px;
|
|
background-color: #9E9E9E;
|
|
display: block;
|
|
border-radius: 50%;
|
|
opacity: 0.4;
|
|
animation: 1s blink infinite;
|
|
}
|
|
.typing-indicator span:nth-child(2) { animation-delay: .2s; }
|
|
.typing-indicator span:nth-child(3) { animation-delay: .4s; }
|
|
|
|
@keyframes blink {
|
|
50% { opacity: 1; }
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(10px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
} |