-
Notifications
You must be signed in to change notification settings - Fork 2
Fix/vizualisation #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -527,17 +527,130 @@ input[type="range"]::-moz-range-thumb { | |
|
|
||
| /* Tooltip */ | ||
| .tooltip { | ||
| position: absolute; | ||
| position: fixed; | ||
| background: var(--surface); | ||
| border: 1px solid var(--border); | ||
| border-radius: 8px; | ||
| padding: 10px 14px; | ||
| border-radius: 10px; | ||
| padding: 0; | ||
| font-size: 12px; | ||
| pointer-events: none; | ||
| opacity: 0; | ||
| transition: opacity 0.15s; | ||
| z-index: 100; | ||
| box-shadow: var(--shadow); | ||
| z-index: 1000; | ||
| box-shadow: var(--shadow-lg); | ||
| min-width: 180px; | ||
| max-width: 260px; | ||
| } | ||
|
|
||
| .tooltip-header { | ||
| padding: 10px 14px; | ||
| font-weight: 600; | ||
| font-size: 13px; | ||
| border-bottom: 1px solid var(--border); | ||
| background: var(--surface-hover); | ||
| border-radius: 10px 10px 0 0; | ||
| } | ||
|
|
||
| .tooltip-content { | ||
| padding: 10px 14px; | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 8px; | ||
| } | ||
|
|
||
| .tooltip-product { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 8px; | ||
| } | ||
|
|
||
| .tooltip-product-label { | ||
| font-size: 10px; | ||
| font-weight: 600; | ||
| padding: 2px 6px; | ||
| border-radius: 4px; | ||
| min-width: 28px; | ||
| text-align: center; | ||
| } | ||
|
|
||
| .tooltip-bar-bg { | ||
| flex: 1; | ||
| height: 6px; | ||
| background: var(--input-bg); | ||
| border-radius: 3px; | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| .tooltip-bar { | ||
| height: 100%; | ||
| border-radius: 3px; | ||
| transition: width 0.2s; | ||
| } | ||
|
|
||
| .tooltip-qty { | ||
| font-size: 11px; | ||
| font-weight: 500; | ||
| color: var(--text-muted); | ||
| min-width: 60px; | ||
| text-align: right; | ||
| } | ||
|
|
||
| .tooltip-qty.excess { | ||
| color: #f59e0b; | ||
| } | ||
|
|
||
| .tooltip-qty.shortage { | ||
| color: #ef4444; | ||
| } | ||
|
|
||
| .tooltip-product.excess { | ||
| background: rgba(245, 158, 11, 0.1); | ||
| margin: -4px -8px; | ||
| padding: 4px 8px; | ||
| border-radius: 4px; | ||
| } | ||
|
|
||
| .tooltip-product.shortage { | ||
| background: rgba(239, 68, 68, 0.1); | ||
| margin: -4px -8px; | ||
| padding: 4px 8px; | ||
| border-radius: 4px; | ||
| } | ||
|
|
||
| .tooltip-summary { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| align-items: center; | ||
| padding-top: 8px; | ||
| border-top: 1px solid var(--border); | ||
| margin-top: 4px; | ||
| font-size: 11px; | ||
| color: var(--text-muted); | ||
| } | ||
|
|
||
| .tooltip-excess-badge { | ||
| background: rgba(245, 158, 11, 0.2); | ||
| color: #f59e0b; | ||
| padding: 2px 6px; | ||
| border-radius: 4px; | ||
| font-weight: 600; | ||
| font-size: 10px; | ||
| } | ||
|
|
||
| .tooltip-shortage-badge { | ||
| background: rgba(239, 68, 68, 0.2); | ||
| color: #ef4444; | ||
| padding: 2px 6px; | ||
| border-radius: 4px; | ||
| font-weight: 600; | ||
| font-size: 10px; | ||
| } | ||
|
|
||
| .tooltip-empty { | ||
| color: var(--text-dim); | ||
| font-style: italic; | ||
| text-align: center; | ||
| padding: 4px 0; | ||
| } | ||
|
|
||
| /* ═══════════════════════════════════════════════════════════════ | ||
|
|
@@ -840,3 +953,107 @@ input[type="range"]::-moz-range-thumb { | |
| background: var(--border); | ||
| border-radius: 2px; | ||
| } | ||
|
|
||
| /* ═══════════════════════════════════════════════════════════════ | ||
| NOTIFICATION CONTAINER (Product Swap Notifications) | ||
| ═══════════════════════════════════════════════════════════════ */ | ||
|
|
||
| .notification-container { | ||
| position: absolute; | ||
| top: 16px; | ||
| right: 16px; | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 8px; | ||
| z-index: 100; | ||
| max-width: 280px; | ||
| pointer-events: none; | ||
| } | ||
|
|
||
| .notification { | ||
| background: var(--surface); | ||
| border: 1px solid var(--border); | ||
| border-left: 4px solid var(--primary); | ||
| border-radius: 8px; | ||
| padding: 12px 16px; | ||
| box-shadow: var(--shadow); | ||
| animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-in 2.7s; | ||
| pointer-events: auto; | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 10px; | ||
| } | ||
|
|
||
| .notification.fade-out { | ||
| animation: fadeOut 0.3s ease-in forwards; | ||
| } | ||
|
Comment on lines
+973
to
+989
|
||
|
|
||
| .notification-icon { | ||
| font-size: 18px; | ||
| } | ||
|
|
||
| .notification-content { | ||
| flex: 1; | ||
| } | ||
|
|
||
| .notification-title { | ||
| font-size: 12px; | ||
| font-weight: 600; | ||
| color: var(--text); | ||
| margin-bottom: 2px; | ||
| } | ||
|
|
||
| .notification-message { | ||
| font-size: 11px; | ||
| color: var(--text-muted); | ||
| } | ||
|
|
||
| .notification-truck { | ||
| display: inline-block; | ||
| width: 8px; | ||
| height: 8px; | ||
| border-radius: 50%; | ||
| margin-right: 6px; | ||
| vertical-align: middle; | ||
| } | ||
|
|
||
| @keyframes slideIn { | ||
| from { | ||
| transform: translateX(100%); | ||
| opacity: 0; | ||
| } | ||
| to { | ||
| transform: translateX(0); | ||
| opacity: 1; | ||
| } | ||
| } | ||
|
|
||
| @keyframes fadeOut { | ||
| from { | ||
| opacity: 1; | ||
| } | ||
| to { | ||
| opacity: 0; | ||
| } | ||
| } | ||
|
|
||
| /* Responsive notification */ | ||
| @media (max-width: 768px) { | ||
| .notification-container { | ||
| top: 8px; | ||
| right: 8px; | ||
| max-width: 200px; | ||
| } | ||
|
|
||
| .notification { | ||
| padding: 8px 12px; | ||
| } | ||
|
|
||
| .notification-title { | ||
| font-size: 11px; | ||
| } | ||
|
|
||
| .notification-message { | ||
| font-size: 10px; | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The notification container is positioned at top/right 16px, which is the same placement as #mapOverlay. Since .notification-container has a higher z-index, it can cover the overlay badge. Consider offsetting notifications (e.g., below the overlay) or moving one of the elements to avoid overlap.