Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
227 changes: 222 additions & 5 deletions pages/static/css/visualisation.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/* ═══════════════════════════════════════════════════════════════
Expand Down Expand Up @@ -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;
}
Comment on lines +961 to +971
Copy link

Copilot AI Feb 9, 2026

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.

Copilot uses AI. Check for mistakes.

.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
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.notification has a CSS fadeOut animation scheduled (2.7s delay) and the JS also triggers a second fade-out via the .fade-out class at 3s. Because the base fadeOut animation doesn't use animation-fill-mode: forwards, the notification can snap back to full opacity at 3s and then fade again (visible flicker). Use a single fade-out mechanism (CSS-only or JS-only) or ensure the CSS fadeOut persists with forwards.

Copilot uses AI. Check for mistakes.

.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;
}
}
Loading
Loading