flare / flare-ui /src /app /components /chat /realtime-chat.component.scss
ciyidogan's picture
Update flare-ui/src/app/components/chat/realtime-chat.component.scss
c830ced verified
raw
history blame
3.83 kB
.realtime-chat-container {
max-width: 800px;
margin: 20px auto;
height: 80vh;
display: flex;
flex-direction: column;
position: relative;
}
mat-card-header {
position: relative;
.close-button {
position: absolute;
top: 8px;
right: 8px;
}
}
.error-banner {
background-color: #ffebee;
color: #c62828;
padding: 12px;
border-radius: 4px;
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 16px;
mat-icon {
font-size: 20px;
width: 20px;
height: 20px;
}
span {
flex: 1;
}
}
.transcription-area {
background: #e8f5e9;
padding: 16px;
border-radius: 8px;
margin-bottom: 16px;
min-height: 60px;
border: 2px solid #4caf50;
transition: all 0.3s ease;
.transcription-label {
font-size: 12px;
color: #2e7d32;
margin-bottom: 8px;
display: flex;
align-items: center;
gap: 8px;
.pulse-icon {
font-size: 16px;
animation: pulse 1.5s infinite;
color: #4caf50;
}
}
.transcription-text {
font-size: 16px;
color: #1b5e20;
min-height: 24px;
font-weight: 500;
&:empty::after {
content: '...';
color: #81c784;
animation: dots 1.5s infinite;
}
}
}
@keyframes pulse {
0% { transform: scale(1); opacity: 1; }
50% { transform: scale(1.1); opacity: 0.8; }
100% { transform: scale(1); opacity: 1; }
}
@keyframes dots {
0%, 20% { content: '.'; }
40% { content: '..'; }
60%, 100% { content: '...'; }
}
.chat-messages {
flex: 1;
overflow-y: auto;
padding: 16px;
background: #fafafa;
border-radius: 8px;
min-height: 200px;
max-height: 400px;
}
.message {
display: flex;
align-items: flex-start;
margin-bottom: 16px;
animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.message.user {
flex-direction: row-reverse;
}
.message.system {
justify-content: center;
.message-content {
background: #e0e0e0;
font-style: italic;
max-width: 80%;
}
}
.message-icon {
margin: 0 8px;
color: #666;
}
.message-content {
max-width: 70%;
background: white;
padding: 12px 16px;
border-radius: 12px;
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
position: relative;
}
.message.user .message-content {
background: #3f51b5;
color: white;
}
.message-text {
margin-bottom: 4px;
}
.message-time {
font-size: 11px;
opacity: 0.7;
}
.audio-button {
margin-top: 8px;
}
.empty-state {
text-align: center;
padding: 60px 20px;
color: #999;
mat-icon {
font-size: 48px;
width: 48px;
height: 48px;
margin-bottom: 16px;
}
}
.audio-visualizer {
width: 100%;
height: 100px;
background: #212121;
border-radius: 8px;
margin-top: 16px;
opacity: 0.5;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
&.active {
opacity: 1;
background: #1a1a1a;
box-shadow: 0 0 30px rgba(76, 175, 80, 0.4);
&::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.1), transparent);
animation: scan 2s linear infinite;
}
}
}
@keyframes scan {
0% { transform: translateX(-100%); }
100% { transform: translateX(100%); }
}
@keyframes visualizerPulse {
0% { transform: scale(1); }
50% { transform: scale(1.01); }
100% { transform: scale(1); }
}
mat-chip {
font-size: 12px;
}
mat-chip.active {
background-color: #3f51b5 !important;
color: white !important;
}
mat-card-actions {
padding: 16px;
display: flex;
gap: 16px;
justify-content: flex-start;
mat-spinner {
display: inline-block;
margin-right: 8px;
}
}