128 lines
2.3 KiB
CSS
128 lines
2.3 KiB
CSS
/* ============================================
|
|
Toast Notifications
|
|
============================================ */
|
|
|
|
.toast-container {
|
|
position: fixed;
|
|
bottom: 24px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 9999;
|
|
display: flex;
|
|
flex-direction: column-reverse;
|
|
gap: 8px;
|
|
pointer-events: none;
|
|
width: max-content;
|
|
max-width: min(420px, calc(100vw - 32px));
|
|
}
|
|
|
|
.toast {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 12px 14px;
|
|
border-radius: 10px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
pointer-events: auto;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
|
|
border: 1px solid transparent;
|
|
opacity: 0;
|
|
transform: translateY(10px);
|
|
transition: opacity 0.22s ease, transform 0.22s ease;
|
|
line-height: 1.4;
|
|
cursor: default;
|
|
}
|
|
|
|
.toast--visible {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.toast--success {
|
|
background: #f0fdf4;
|
|
border-color: #bbf7d0;
|
|
color: #15803d;
|
|
}
|
|
|
|
.toast--error {
|
|
background: #fef2f2;
|
|
border-color: #fecaca;
|
|
color: #dc2626;
|
|
}
|
|
|
|
.toast--warning {
|
|
background: #fffbeb;
|
|
border-color: #fde68a;
|
|
color: #d97706;
|
|
}
|
|
|
|
.toast--info {
|
|
background: #eff6ff;
|
|
border-color: #bfdbfe;
|
|
color: #2563eb;
|
|
}
|
|
|
|
.toast-icon {
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.toast-message {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.toast-close {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 2px;
|
|
display: flex;
|
|
align-items: center;
|
|
color: inherit;
|
|
opacity: 0.55;
|
|
border-radius: 4px;
|
|
flex-shrink: 0;
|
|
transition: opacity 0.15s, background-color 0.15s;
|
|
}
|
|
|
|
.toast-close:hover {
|
|
opacity: 1;
|
|
background: rgba(0, 0, 0, 0.07);
|
|
}
|
|
|
|
/* Dark mode */
|
|
:root[data-theme='dark'] .toast--success {
|
|
background: rgba(22, 163, 74, 0.15);
|
|
border-color: rgba(22, 163, 74, 0.3);
|
|
color: #86efac;
|
|
}
|
|
|
|
:root[data-theme='dark'] .toast--error {
|
|
background: rgba(220, 38, 38, 0.15);
|
|
border-color: rgba(220, 38, 38, 0.3);
|
|
color: #fca5a5;
|
|
}
|
|
|
|
:root[data-theme='dark'] .toast--warning {
|
|
background: rgba(217, 119, 6, 0.15);
|
|
border-color: rgba(217, 119, 6, 0.3);
|
|
color: #fcd34d;
|
|
}
|
|
|
|
:root[data-theme='dark'] .toast--info {
|
|
background: rgba(37, 99, 235, 0.15);
|
|
border-color: rgba(37, 99, 235, 0.3);
|
|
color: #93c5fd;
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.toast-container {
|
|
bottom: 16px;
|
|
width: calc(100vw - 32px);
|
|
max-width: none;
|
|
}
|
|
}
|