PangandaranAI_FE / src /app /chatbot /page.module.css
rsam-66's picture
fix: chat sessions delete fix
cef360a
Raw History Blame Contribute Delete
5.19 kB
.chatArea {
background: var(--bg-surface);
padding: var(--space-md);
}
/* ---- Session List View ---- */
.listArea {
background: var(--bg-primary);
padding: var(--space-md);
position: relative;
}
.sessionList {
display: flex;
flex-direction: column;
gap: 8px;
}
.sessionCard {
display: flex;
align-items: center;
gap: 12px;
padding: 14px;
background: var(--bg-card);
border: 1px solid var(--border-light);
border-radius: var(--radius-md);
text-align: left;
width: 100%;
transition: transform 0.15s, box-shadow 0.15s;
animation: slideUp 0.3s ease-out both;
}
.sessionCard:hover {
box-shadow: var(--shadow-md);
transform: translateY(-1px);
}
.sessionCard:active {
transform: scale(0.99);
}
.sessionIcon {
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--primary-alpha);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.sessionInfo {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.sessionTitle {
font-size: 14px;
font-weight: 600;
color: var(--text-primary);
margin: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.sessionPreview {
font-size: 12px;
color: var(--text-secondary);
margin: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.sessionDate {
font-size: 11px;
color: var(--text-secondary);
opacity: 0.7;
}
.deleteBtn {
width: 32px;
height: 32px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-secondary);
flex-shrink: 0;
transition: color 0.2s, background 0.2s;
}
.deleteBtn:hover {
color: var(--danger);
background: rgba(244, 67, 54, 0.08);
}
/* Empty State */
.emptyState {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: var(--space-sm);
padding: var(--space-xl) 0;
flex: 1;
}
.emptyIcon {
opacity: 0.4;
}
.emptyText {
font-size: 16px;
font-weight: 600;
color: var(--text-primary);
margin: 0;
}
.emptySubtext {
font-size: 13px;
color: var(--text-secondary);
margin: 0;
}
/* FAB */
.fab {
position: absolute;
bottom: 20px;
right: 20px;
width: 56px;
height: 56px;
border-radius: 50%;
background: var(--primary);
color: white;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 16px rgba(0, 137, 123, 0.3);
transition: transform 0.2s, box-shadow 0.2s;
z-index: 10;
touch-action: manipulation; /* eliminates 300ms tap delay on mobile */
}
.fab:hover {
transform: scale(1.05);
box-shadow: 0 6px 20px rgba(0, 137, 123, 0.4);
}
.fab:active {
transform: scale(0.95);
}
/* ---- Welcome State ---- */
.welcomeState {
display: flex;
flex-direction: column;
gap: var(--space-md);
}
.welcomeLabel {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
font-weight: 500;
color: var(--text-secondary);
padding: 6px 12px;
background: var(--primary-alpha);
border-radius: var(--radius-pill);
width: fit-content;
margin: 0 auto;
}
.promptsContainer {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: 4px;
}
.voiceHint {
text-align: center;
font-size: 12px;
color: var(--text-secondary);
margin-top: 4px;
}
/* ---- Conversation State ---- */
.messagesContainer {
display: flex;
flex-direction: column;
gap: var(--space-md);
padding-bottom: var(--space-sm);
}
.messageRow {
display: flex;
flex-direction: column;
}
/* ---- Typing Indicator ---- */
.typingIndicator {
display: flex;
align-items: center;
gap: 8px;
animation: fadeIn 0.3s ease-out;
}
.avatarSmall {
width: 28px;
height: 28px;
border-radius: 50%;
background: var(--primary);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.dots {
display: flex;
gap: 4px;
padding: 10px 14px;
background: var(--bg-card);
border-radius: var(--radius-md);
border-top-left-radius: 4px;
box-shadow: var(--shadow-sm);
}
.dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--text-secondary);
animation: pulse 1.2s infinite;
}
.dot:nth-child(2) {
animation-delay: 0.2s;
}
.dot:nth-child(3) {
animation-delay: 0.4s;
}
/* ---- Error ---- */
.errorMsg {
font-size: 13px;
color: var(--danger);
background: rgba(244, 67, 54, 0.08);
padding: 8px 12px;
border-radius: var(--radius-sm);
text-align: center;
}
@keyframes pulse {
0%,
100% {
opacity: 0.3;
transform: scale(0.85);
}
50% {
opacity: 1;
transform: scale(1);
}
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}