118 lines
2.0 KiB
CSS
118 lines
2.0 KiB
CSS
/* Toast Notification */
|
|
.toast-container {
|
|
position: fixed;
|
|
top: 24px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 100;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
pointer-events: none;
|
|
align-items: center;
|
|
}
|
|
|
|
.toast {
|
|
background: #fff;
|
|
border: 0.5px solid var(--border);
|
|
border-radius: 6px;
|
|
padding: 12px 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
min-width: 300px;
|
|
max-width: 400px;
|
|
animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.toast.out {
|
|
animation: toastOut 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
}
|
|
|
|
.toast-icon {
|
|
flex-shrink: 0;
|
|
width: 20px;
|
|
height: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.toast-success .toast-icon {
|
|
background: #ecfdf5;
|
|
color: #059669;
|
|
}
|
|
|
|
.toast-error .toast-icon {
|
|
background: #fef2f2;
|
|
color: #dc2626;
|
|
}
|
|
|
|
.toast-content {
|
|
flex: 1;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
html[data-theme='dark'] .toast {
|
|
background: #111111;
|
|
border-color: #2a2a2a;
|
|
color: #eaeaea;
|
|
}
|
|
|
|
html[data-theme='dark'] .toast-success .toast-icon {
|
|
background: rgba(16, 185, 129, 0.16);
|
|
color: #34d399;
|
|
}
|
|
|
|
html[data-theme='dark'] .toast-error .toast-icon {
|
|
background: rgba(248, 113, 113, 0.16);
|
|
color: #f87171;
|
|
}
|
|
|
|
@keyframes toastIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px) scale(0.95);
|
|
}
|
|
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0) scale(1);
|
|
}
|
|
}
|
|
|
|
@keyframes toastOut {
|
|
from {
|
|
opacity: 1;
|
|
transform: translateY(0) scale(1);
|
|
}
|
|
|
|
to {
|
|
opacity: 0;
|
|
transform: translateY(10px) scale(0.95);
|
|
}
|
|
}
|
|
html[data-theme='dark'] .toast {
|
|
background: #131a24;
|
|
border-color: #334155;
|
|
color: #e6edf3;
|
|
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
|
|
}
|
|
|
|
html[data-theme='dark'] .toast-content {
|
|
color: #e6edf3;
|
|
}
|
|
|
|
html[data-theme='dark'] .toast-success .toast-icon {
|
|
background: rgba(16, 185, 129, 0.18);
|
|
color: #34d399;
|
|
}
|
|
|
|
html[data-theme='dark'] .toast-error .toast-icon {
|
|
background: rgba(248, 113, 113, 0.18);
|
|
color: #f87171;
|
|
}
|