new chnages in ui

This commit is contained in:
2026-05-27 15:22:45 +05:30
parent 8c2248974e
commit 15f15958e6
4 changed files with 1206 additions and 456 deletions

View File

@@ -1959,6 +1959,16 @@
padding: 4px 10px;
border-radius: 8px;
background: var(--bg-sub);
font-variant-numeric: tabular-nums;
font-feature-settings: 'tnum';
white-space: nowrap;
}
/* All deliveries done — flip to green so it pops vs the per-rider tint
(mirrors the old right-corner .rchip-n.is-done treatment). */
.dispatch-container .rcard-badge.is-done {
background: rgba(22, 163, 74, 0.12);
color: #16a34a;
}
.dispatch-container .bar-bg {
@@ -5453,7 +5463,7 @@
border-radius: 14px;
box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
overflow: hidden;
min-width: 460px;
min-width: 580px;
animation: dispatch-popup-in 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
@@ -5476,7 +5486,77 @@
}
.dispatch-container .dispatch-popup .leaflet-popup-content {
min-width: 460px;
min-width: 580px;
}
/* --- Centered order popup overlay ---
Rendered as a child of .dispatch-container (NOT inside leaflet's
transformed panes), so position: fixed centers on the viewport instead
of inheriting the map's pan offset. Keeps the rich order card fully
visible on small laptop displays where the marker-attached popup would
spill above/below the map and get clipped. */
.dispatch-container .dispatch-popup-center {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1700;
pointer-events: auto;
max-width: calc(100vw - 32px);
max-height: calc(100vh - 32px);
display: flex;
animation: dispatch-popup-in 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
/* The card itself — mirrors the chrome the old leaflet-popup-content-wrapper
provided (rounded corners, soft shadow, hidden overflow) so the inner
.pu-header / .pu-body / .pu-distance-row blocks render identically. */
.dispatch-container .dispatch-popup-center .dispatch-popup-card {
position: relative;
background: #fff;
border-radius: 14px;
box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
/* min() clamps the minimum width so it shrinks gracefully on narrow
viewports instead of forcing horizontal overflow. */
min-width: min(580px, calc(100vw - 32px));
max-width: 680px;
max-height: calc(100vh - 32px);
overflow-x: hidden;
overflow-y: auto;
}
/* Close button — sits in the top-right corner over the purple header. */
.dispatch-container .dispatch-popup-center-close {
position: absolute;
top: 8px;
right: 8px;
width: 26px;
height: 26px;
border: 0;
border-radius: 50%;
background: rgba(255, 255, 255, 0.2);
color: #fff;
font-size: 20px;
font-weight: 700;
line-height: 1;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
z-index: 2;
transition: background 0.15s ease;
}
.dispatch-container .dispatch-popup-center-close:hover {
background: rgba(255, 255, 255, 0.35);
}
/* Reserve room on the right of the header so the close button doesn't
overlap the status chip. Only applied when the popup is rendered in the
centered overlay (the leaflet-attached variant didn't have a close X). */
.dispatch-container .dispatch-popup-center .dispatch-popup .pu-header {
padding-right: 44px;
}
/* --- Header: purple gradient with order id + status + rider --- */
@@ -5559,18 +5639,18 @@
we constrain (via leaflet's maxWidth prop) so the body grows downward as
needed for the timeline + details to render in full. */
.dispatch-container .dispatch-popup .pu-body {
padding: 4px 18px 16px;
padding: 4px 16px 12px;
}
.dispatch-container .dispatch-popup .pu-section {
margin-top: 12px;
margin-top: 8px;
}
.dispatch-container .dispatch-popup .pu-section-label {
/* Scoped override: no horizontal margin since pu-body already provides
the gutter. Sits flush with section content. */
margin: 0 0 8px;
padding-bottom: 6px;
margin: 0 0 6px;
padding-bottom: 4px;
font-size: 10px;
font-weight: 800;
letter-spacing: 0.08em;
@@ -5579,18 +5659,21 @@
border-bottom: 1px solid rgba(123, 31, 162, 0.18);
}
/* --- Timeline (scoped override of the earlier rules so paddings match
the new pu-body gutter) --- */
/* --- Timeline: lay events out as a 2-column grid so the 6-row vertical
stack collapses to 3 rows. Keeps the popup short enough to fit on
small-laptop map heights. The connecting line (::before) is hidden
in this layout since the rows no longer form a single column. --- */
.dispatch-container .dispatch-popup .pu-timeline {
padding: 4px 0 4px 4px;
display: flex;
flex-direction: column;
gap: 6px;
padding: 2px 0;
display: grid;
grid-template-columns: 1fr 1fr;
column-gap: 14px;
row-gap: 4px;
position: relative;
}
.dispatch-container .dispatch-popup .pu-timeline::before {
left: 7px;
display: none;
}
/* --- Details grid: 2 columns of icon/label/value tiles --- */
@@ -5657,8 +5740,8 @@
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: 10px;
padding-top: 10px;
margin-top: 8px;
padding-top: 8px;
border-top: 1px dashed rgba(123, 31, 162, 0.18);
}