style(toast): reposition to bottom-center, solid bg, larger text, longer duration

This commit is contained in:
Pontoporeia
2026-04-30 16:00:19 +02:00
parent e8bf89d184
commit 34b2d073ee
7 changed files with 331 additions and 302 deletions

View File

@@ -142,46 +142,48 @@
filter: brightness(0.9);
}
/* ── Toast messages (top-right, CSS-only auto-fade) ─────────────────── */
/* ── Toast messages (bottom-center, CSS-only auto-fade) ─────────────── */
#toast-region {
position: fixed;
top: var(--space-l);
right: var(--space-l);
bottom: var(--space-l);
left: 50%;
transform: translateX(-50%);
z-index: 10000;
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-xs);
pointer-events: none;
max-width: min(480px, calc(100vw - 2 * var(--space-l)));
width: max-content;
max-width: min(560px, calc(100vw - 2 * var(--space-l)));
}
.toast {
padding: var(--space-xs) var(--space-s);
border-radius: 6px;
font-size: var(--step--1);
border-left: 3px solid;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
padding: var(--space-s) var(--space-m);
border-radius: 8px;
font-size: var(--step-0);
border-left: 4px solid;
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
pointer-events: auto;
backdrop-filter: blur(6px);
/* enter then fade out — total visible ~4.35 s */
/* enter then fade out — total visible ~6.35 s */
animation: toast-enter 0.35s ease-out,
toast-exit 0.4s ease-in 4s forwards;
toast-exit 0.5s ease-in 6s forwards;
}
.toast--error {
background: var(--accent-muted);
background: var(--bg-secondary);
border-color: var(--error);
color: var(--text-primary);
}
.toast--success {
background: var(--success-muted-bg);
background: var(--bg-secondary);
border-color: var(--success);
color: var(--text-primary);
}
@keyframes toast-enter {
from { opacity: 0; transform: translateY(-12px); }
from { opacity: 0; transform: translateY(12px); }
to { opacity: 1; transform: translateY(0); }
}