Spaces:
Paused
Paused
| .notification-container { | |
| position: fixed; | |
| z-index: 9999; | |
| display: flex; | |
| flex-direction: column; | |
| gap: var(--spacing, 10px); | |
| pointer-events: none; | |
| } | |
| .notification-list { | |
| display: flex; | |
| flex-direction: column; | |
| gap: var(--spacing, 10px); | |
| } | |
| .notification-list.collapsed { | |
| gap: 0; | |
| } | |
| .notification-list.collapsed .notification:not(:first-child) { | |
| margin-top: -80%; | |
| opacity: 0.3; | |
| transform: scale(0.95); | |
| } | |
| /* Position variations */ | |
| .position-top-left { | |
| top: var(--offset-y); | |
| left: var(--offset-x); | |
| align-items: flex-start; | |
| } | |
| .position-top-center { | |
| top: var(--offset-y); | |
| left: 50%; | |
| transform: translateX(-50%); | |
| align-items: center; | |
| } | |
| .position-top-right { | |
| top: var(--offset-y); | |
| right: var(--offset-x); | |
| align-items: flex-end; | |
| } | |
| .position-bottom-left { | |
| bottom: var(--offset-y); | |
| left: var(--offset-x); | |
| align-items: flex-start; | |
| } | |
| .position-bottom-center { | |
| bottom: var(--offset-y); | |
| left: 50%; | |
| transform: translateX(-50%); | |
| align-items: center; | |
| } | |
| .position-bottom-right { | |
| bottom: var(--offset-y); | |
| right: var(--offset-x); | |
| align-items: flex-end; | |
| } | |
| .position-center { | |
| top: 50%; | |
| left: 50%; | |
| transform: translate(-50%, -50%); | |
| align-items: center; | |
| } | |
| /* Stack direction */ | |
| .stack-up { | |
| flex-direction: column-reverse; | |
| } | |
| .stack-up .notification-list { | |
| flex-direction: column-reverse; | |
| } | |
| /* Base notification styles */ | |
| .notification { | |
| background: white; | |
| border-radius: 8px; | |
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); | |
| min-width: 300px; | |
| max-width: 500px; | |
| position: relative; | |
| overflow: hidden; | |
| pointer-events: all; | |
| transition: all 0.3s ease; | |
| } | |
| .notification-content { | |
| padding: 16px; | |
| display: flex; | |
| gap: 12px; | |
| align-items: flex-start; | |
| } | |
| .notification-icon { | |
| flex-shrink: 0; | |
| font-size: 24px; | |
| display: flex; | |
| align-items: center; | |
| } | |
| .notification-body { | |
| flex: 1; | |
| min-width: 0; | |
| } | |
| .notification-title { | |
| font-weight: 600; | |
| font-size: 16px; | |
| margin-bottom: 4px; | |
| color: #333; | |
| word-wrap: break-word; | |
| } | |
| .notification-message { | |
| font-size: 14px; | |
| color: #666; | |
| line-height: 1.5; | |
| word-wrap: break-word; | |
| } | |
| .notification-actions { | |
| display: flex; | |
| gap: 8px; | |
| margin-top: 12px; | |
| flex-wrap: wrap; | |
| } | |
| .notification-action { | |
| padding: 6px 12px; | |
| border: none; | |
| border-radius: 4px; | |
| font-size: 14px; | |
| font-weight: 500; | |
| cursor: pointer; | |
| transition: all 0.2s; | |
| background: #1976d2; | |
| color: white; | |
| } | |
| .notification-action:hover { | |
| background: #1565c0; | |
| transform: translateY(-1px); | |
| } | |
| .notification-close { | |
| background: none; | |
| border: none; | |
| color: #999; | |
| cursor: pointer; | |
| font-size: 18px; | |
| padding: 4px; | |
| transition: color 0.2s; | |
| display: flex; | |
| align-items: center; | |
| } | |
| .notification-close:hover { | |
| color: #666; | |
| } | |
| .notification-footer { | |
| padding: 12px 16px; | |
| background: #f5f5f5; | |
| border-top: 1px solid #e0e0e0; | |
| font-size: 12px; | |
| color: #666; | |
| } | |
| /* Notification types */ | |
| .notification-success { | |
| border-left: 4px solid #4caf50; | |
| } | |
| .notification-success .notification-icon { | |
| color: #4caf50; | |
| } | |
| .notification-error { | |
| border-left: 4px solid #f44336; | |
| } | |
| .notification-error .notification-icon { | |
| color: #f44336; | |
| } | |
| .notification-warning { | |
| border-left: 4px solid #ff9800; | |
| } | |
| .notification-warning .notification-icon { | |
| color: #ff9800; | |
| } | |
| .notification-info { | |
| border-left: 4px solid #2196f3; | |
| } | |
| .notification-info .notification-icon { | |
| color: #2196f3; | |
| } | |
| /* Dark theme */ | |
| .theme-dark .notification { | |
| background: #1e1e1e; | |
| color: #fff; | |
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); | |
| } | |
| .theme-dark .notification-title { | |
| color: #fff; | |
| } | |
| .theme-dark .notification-message { | |
| color: #ccc; | |
| } | |
| .theme-dark .notification-close { | |
| color: #666; | |
| } | |
| .theme-dark .notification-close:hover { | |
| color: #999; | |
| } | |
| .theme-dark .notification-footer { | |
| background: #2a2a2a; | |
| border-top-color: #444; | |
| color: #999; | |
| } | |
| /* Animations */ | |
| /* Slide animation */ | |
| .animation-slide { | |
| animation: slideIn 0.3s ease-out forwards; | |
| animation-delay: var(--animation-delay, 0s); | |
| } | |
| @keyframes slideIn { | |
| from { | |
| transform: translateX(100%); | |
| opacity: 0; | |
| } | |
| to { | |
| transform: translateX(0); | |
| opacity: 1; | |
| } | |
| } | |
| .position-top-left .animation-slide, | |
| .position-bottom-left .animation-slide { | |
| animation-name: slideInLeft; | |
| } | |
| @keyframes slideInLeft { | |
| from { | |
| transform: translateX(-100%); | |
| opacity: 0; | |
| } | |
| to { | |
| transform: translateX(0); | |
| opacity: 1; | |
| } | |
| } | |
| /* Fade animation */ | |
| .animation-fade { | |
| animation: fadeIn 0.3s ease-out forwards; | |
| animation-delay: var(--animation-delay, 0s); | |
| } | |
| @keyframes fadeIn { | |
| from { | |
| opacity: 0; | |
| } | |
| to { | |
| opacity: 1; | |
| } | |
| } | |
| /* Zoom animation */ | |
| .animation-zoom { | |
| animation: zoomIn 0.3s ease-out forwards; | |
| animation-delay: var(--animation-delay, 0s); | |
| } | |
| @keyframes zoomIn { | |
| from { | |
| transform: scale(0.8); | |
| opacity: 0; | |
| } | |
| to { | |
| transform: scale(1); | |
| opacity: 1; | |
| } | |
| } | |
| /* Bounce animation */ | |
| .animation-bounce { | |
| animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards; | |
| animation-delay: var(--animation-delay, 0s); | |
| } | |
| @keyframes bounceIn { | |
| 0% { | |
| transform: translateY(-100%); | |
| opacity: 0; | |
| } | |
| 60% { | |
| transform: translateY(10%); | |
| opacity: 1; | |
| } | |
| 100% { | |
| transform: translateY(0); | |
| opacity: 1; | |
| } | |
| } | |
| /* Progress bar */ | |
| .notification-progress { | |
| position: absolute; | |
| bottom: 0; | |
| left: 0; | |
| height: 3px; | |
| background: currentColor; | |
| opacity: 0.3; | |
| animation: progress linear forwards; | |
| animation-duration: var(--duration); | |
| } | |
| @keyframes progress { | |
| from { | |
| width: 100%; | |
| } | |
| to { | |
| width: 0%; | |
| } | |
| } | |
| /* Collapse toggle */ | |
| .notification-collapse-toggle { | |
| align-self: center; | |
| padding: 8px 16px; | |
| background: #1976d2; | |
| color: white; | |
| border: none; | |
| border-radius: 20px; | |
| font-size: 14px; | |
| cursor: pointer; | |
| pointer-events: all; | |
| margin-bottom: 8px; | |
| transition: all 0.2s; | |
| } | |
| .notification-collapse-toggle:hover { | |
| background: #1565c0; | |
| transform: translateY(-1px); | |
| } | |
| /* Responsive */ | |
| @media (max-width: 600px) { | |
| .notification { | |
| min-width: calc(100vw - 40px); | |
| max-width: calc(100vw - 40px); | |
| } | |
| .position-top-center, | |
| .position-bottom-center { | |
| transform: none; | |
| left: 20px; | |
| right: 20px; | |
| } | |
| } |