diff --git a/css/index.css b/css/index.css index 1db3b97a..a2993a3f 100644 --- a/css/index.css +++ b/css/index.css @@ -5196,3 +5196,133 @@ body { .subject-sidebar-item:hover .delete-subject-btn { opacity: 1; } + +/* Toast Notifications (Issue #1210) */ +.toast-container { + position: fixed; + top: 24px; + right: 24px; + display: flex; + flex-direction: column; + gap: 12px; + z-index: 9999; + pointer-events: none; +} + +.toast-notification { + pointer-events: auto; + display: flex; + align-items: center; + gap: 12px; + padding: 12px 16px; + border-radius: var(--border-radius-md); + background: var(--color-background-primary); + border: 1px solid var(--color-border-secondary); + box-shadow: var(--shadow-md); + backdrop-filter: blur(12px); + min-width: 300px; + max-width: 450px; + animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards; +} + +.toast-icon { + font-size: 18px; + display: flex; + align-items: center; + justify-content: center; +} + +.toast-message { + font-size: 13px; + font-weight: 500; + color: var(--color-text-primary); + line-height: 1.4; +} + +.toast-close { + background: none; + border: none; + font-size: 18px; + cursor: pointer; + color: var(--color-text-secondary); + opacity: 0.6; + margin-left: auto; + padding: 0; + display: flex; + align-items: center; + justify-content: center; + transition: opacity 0.2s; +} + +.toast-close:hover { + opacity: 1; +} + +/* Toast Variants */ +.toast-success { + background: var(--color-background-success); + color: var(--color-text-success); + border-color: var(--color-border-success); +} +.toast-success .toast-message, +.toast-success .toast-close { + color: var(--color-text-success); +} + +.toast-error { + background: var(--color-background-danger); + color: var(--color-text-danger); + border-color: var(--color-border-danger); +} +.toast-error .toast-message, +.toast-error .toast-close { + color: var(--color-text-danger); +} + +.toast-warning { + background: var(--color-background-warning); + color: var(--color-text-warning); + border-color: rgba(133, 79, 11, 0.2); +} +.toast-warning .toast-message, +.toast-warning .toast-close { + color: var(--color-text-warning); +} + +.toast-info { + background: var(--color-background-info); + color: var(--color-text-info); + border-color: var(--color-border-info); +} +.toast-info .toast-message, +.toast-info .toast-close { + color: var(--color-text-info); +} + +.toast-notification.toast-hiding { + animation: toastSlideOut 0.3s cubic-bezier(0.7, 0, 0.84, 0) forwards; +} + +/* Keyframes */ +@keyframes toastSlideIn { + from { + transform: translateX(120%); + opacity: 0; + } + to { + transform: translateX(0); + opacity: 1; + } +} + +@keyframes toastSlideOut { + from { + transform: translateX(0); + opacity: 1; + } + to { + transform: translateX(120%); + opacity: 0; + } +} + diff --git a/package-lock.json b/package-lock.json index 56528823..e9685a4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "sqlite3": "^6.0.1" }, "engines": { - "node": "20.x" + "node": ">=20.x" } }, "node_modules/@google/genai": {