champ-chatbot / static /snackbar.css
qyle's picture
deployment
f95a1f1 verified
.snackbar {
position: fixed;
top: 20px;
right: 20px;
padding: 16px 20px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
color: white;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
opacity: 0;
transform: translateX(400px);
transition: all 0.3s ease;
z-index: 9999;
max-width: 350px;
word-wrap: break-word;
}
.snackbar.show {
opacity: 1;
transform: translateX(0);
}
.snackbar-success {
background: #10b981;
}
.snackbar-error {
background: #ef4444;
}
.snackbar-info {
background: #3b82f6;
}
.snackbar-warning {
background: #f59e0b;
}
/* Stack multiple snackbars */
.snackbar:nth-child(n+2) {
top: calc(20px + (70px * var(--index, 0)));
}
@media (max-width: 460px) {
.snackbar {
left: 20px;
right: 20px;
max-width: none;
}
}