/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
#components-reconnect-modal[b-vat7t62g0u] {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1400;
    overflow: hidden;
    background-color: transparent;
    border: none;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0;
}

    #components-reconnect-modal[b-vat7t62g0u]::backdrop {
        background: rgba(0, 0, 0, 0.35);
    }

    #components-reconnect-modal.components-reconnect-show[b-vat7t62g0u],
    #components-reconnect-modal[open][b-vat7t62g0u],
    #components-reconnect-modal.components-reconnect-failed[b-vat7t62g0u],
    #components-reconnect-modal.components-reconnect-repeated-attempt[b-vat7t62g0u],
    #components-reconnect-modal.components-reconnect-paused[b-vat7t62g0u],
    #components-reconnect-modal.components-reconnect-resume-failed[b-vat7t62g0u],
    #components-reconnect-modal.components-pause[b-vat7t62g0u],
    #components-reconnect-modal.components-resume-failed[b-vat7t62g0u] {
        display: flex;
        align-items: flex-end;
        justify-content: center;
    }

.components-reconnect-overlay[b-vat7t62g0u] {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 24px;
    pointer-events: none;
}

.components-reconnect-card[b-vat7t62g0u] {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(420px, 100%);
    padding: 14px 18px;
    border-radius: var(--mud-default-borderradius, 12px);
    background: var(--mud-palette-surface, #fff);
    border: 1px solid color-mix(in srgb, var(--mud-palette-lines-default, #e0e0e0) 60%, transparent);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    color: var(--mud-palette-text-primary, #1f2937);
    animation: reconnect-slide-up-b-vat7t62g0u 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.components-reconnect-logo[b-vat7t62g0u] {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
}

.components-reconnect-body[b-vat7t62g0u] {
    flex: 1;
    min-width: 0;
}

.components-reconnect-text[b-vat7t62g0u] {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.components-reconnect-danger[b-vat7t62g0u] {
    color: var(--mud-palette-error, #b00020);
}

/* Progress bar */
.components-reconnect-progress[b-vat7t62g0u] {
    margin-top: 8px;
    height: 3px;
    border-radius: 3px;
    background: color-mix(in srgb, var(--mud-palette-primary, #594AE2) 15%, transparent);
    overflow: hidden;
}

.components-reconnect-progress-bar[b-vat7t62g0u] {
    height: 100%;
    border-radius: 3px;
    background: var(--mud-palette-primary, #594AE2);
    animation: reconnect-indeterminate-b-vat7t62g0u 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
    transform-origin: left;
}

/* Actions */
.components-reconnect-actions[b-vat7t62g0u] {
    flex-shrink: 0;
}

#components-reconnect-button[b-vat7t62g0u],
#components-resume-button[b-vat7t62g0u] {
    display: none;
    cursor: pointer;
    padding: 7px 14px;
    border: none;
    border-radius: 999px;
    background-color: var(--mud-palette-primary, #594AE2);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: filter 140ms ease, transform 100ms ease;
}

    #components-reconnect-button:hover[b-vat7t62g0u],
    #components-resume-button:hover[b-vat7t62g0u] {
        filter: brightness(0.92);
    }

    #components-reconnect-button:active[b-vat7t62g0u],
    #components-resume-button:active[b-vat7t62g0u] {
        transform: scale(0.96);
    }

/* Visibility rules */
.components-reconnect-first-attempt-visible[b-vat7t62g0u],
.components-reconnect-repeated-attempt-visible[b-vat7t62g0u],
.components-reconnect-failed-visible[b-vat7t62g0u],
.components-pause-visible[b-vat7t62g0u],
.components-resume-failed-visible[b-vat7t62g0u] {
    display: none;
}

dialog[open].components-reconnect-show .components-reconnect-first-attempt-visible[b-vat7t62g0u] {
    display: block;
}

dialog[open].components-reconnect-failed .components-reconnect-failed-visible[b-vat7t62g0u] {
    display: block;
}

dialog[open].components-reconnect-failed #components-reconnect-button[b-vat7t62g0u] {
    display: inline-block;
}

dialog[open].components-reconnect-repeated-attempt .components-reconnect-repeated-attempt-visible[b-vat7t62g0u] {
    display: block;
}

dialog[open].components-reconnect-paused .components-pause-visible[b-vat7t62g0u],
dialog[open].components-pause .components-pause-visible[b-vat7t62g0u] {
    display: block;
}

dialog[open].components-reconnect-paused #components-resume-button[b-vat7t62g0u],
dialog[open].components-pause #components-resume-button[b-vat7t62g0u],
dialog[open].components-reconnect-resume-failed #components-resume-button[b-vat7t62g0u],
dialog[open].components-resume-failed #components-resume-button[b-vat7t62g0u] {
    display: inline-block;
}

dialog[open].components-reconnect-resume-failed .components-resume-failed-visible[b-vat7t62g0u],
dialog[open].components-resume-failed .components-resume-failed-visible[b-vat7t62g0u] {
    display: block;
}

/* Animations */
@keyframes reconnect-slide-up-b-vat7t62g0u {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes reconnect-indeterminate-b-vat7t62g0u {
    0% {
        transform: translateX(-100%) scaleX(0.4);
    }
    50% {
        transform: translateX(20%) scaleX(0.6);
    }
    100% {
        transform: translateX(100%) scaleX(0.4);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .components-reconnect-overlay[b-vat7t62g0u] {
        padding: 14px;
    }

    .components-reconnect-card[b-vat7t62g0u] {
        gap: 10px;
        padding: 12px 14px;
    }

    .components-reconnect-logo[b-vat7t62g0u] {
        width: 28px;
        height: 28px;
    }
}
/* /Components/Pages/Home.razor.rz.scp.css */
/* Tracker (map) page styles — scoped to Home.razor.
   Brand glass skin lives in the tenant theme.css (its !important overlay rules win);
   shared milestone/overlay primitives live in App.css. This file holds only the
   page-specific positioning + the compact milestone variant for the floating banner.
   Note: the `.mud-main-content` full-bleed override stays inline in Home.razor because
   it targets a layout ancestor, which scoped CSS cannot reach. */

.map-container[b-d49wzfse5z] {
    width: 100%;
    position: relative;
}

/* Shipment overlay panels — float above the map, glass style (matches .glass-appbar) */
.shipment-banner[b-d49wzfse5z],
.piece-selector[b-d49wzfse5z] {
    position: absolute;
    z-index: 1100;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.shipment-banner[b-d49wzfse5z] {
    top: 80px;
    left: 12px;
    max-width: calc(100% - 24px);
    padding: 4px 6px 4px 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.shipment-banner .milestone-rail[b-d49wzfse5z] {
    flex: 1 1 auto;
    min-width: 0;
}

/* Collapsed = a single clickable pill (native button) */
button.shipment-banner.collapsed[b-d49wzfse5z] {
    width: 40px;
    height: 40px;
    padding: 0;
    cursor: pointer;
    color: inherit;
    font: inherit;
}

.piece-selector[b-d49wzfse5z] {
    top: 80px;
    right: 20px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Compact milestone rail variant for the floating banner (smaller than the
   ShipmentDetail rail defined in App.css; scoped here so the two don't collide). */
.milestone-rail[b-d49wzfse5z] {
    display: flex;
    align-items: flex-start;
    overflow-x: auto;
    padding: 6px 4px 2px 4px;
    gap: 0;
}

.milestone-cell[b-d49wzfse5z] {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
    flex: 0 0 auto;
}

.milestone-node[b-d49wzfse5z] {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.milestone-node.done[b-d49wzfse5z] {
    background: var(--app-journey-progress-color);
}

.milestone-node.pending[b-d49wzfse5z] {
    background: var(--mud-palette-action-disabled);
}

.milestone-line[b-d49wzfse5z] {
    flex: 1 1 auto;
    height: 3px;
    margin-top: 14px;
    min-width: 16px;
}

.milestone-line.done[b-d49wzfse5z] {
    background: var(--app-journey-progress-color);
}

.milestone-line.half[b-d49wzfse5z] {
    background: linear-gradient(to right, var(--app-journey-progress-color) 50%, var(--mud-palette-action-disabled) 50%);
}

.milestone-line.pending[b-d49wzfse5z] {
    background: var(--mud-palette-action-disabled);
}

.milestone-label[b-d49wzfse5z] {
    margin-top: 4px;
    text-align: center;
}

.milestone-loc[b-d49wzfse5z] {
    font-size: 0.7rem;
    font-weight: 600;
}

.milestone-time[b-d49wzfse5z] {
    font-size: 0.65rem;
    color: var(--mud-palette-text-secondary);
    margin-top: 2px;
}

/* Bottom-docked chart drawer, glass-styled (matches .glass-appbar), single chart at a time */
.chart-drawer[b-d49wzfse5z] {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: min(900px, calc(100vw - 200px));
    z-index: 1100;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 12px 16px;
    animation: chartSlideUp-b-d49wzfse5z 0.3s cubic-bezier(.22, 1, .36, 1);
}

/* The welfare overview is sparse (two stacked tiles + ribbons) — it doesn't need
   the full telemetry-chart width. Narrower on wide screens; the mobile rule below
   (full width) still wins under 800px. */
@media (min-width: 801px) {
    .chart-drawer.chart-drawer-risk[b-d49wzfse5z] {
        width: min(560px, calc(100vw - 200px));
    }
}

@keyframes chartSlideUp-b-d49wzfse5z {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Tame .glass-popup so it stops trying to fill the viewport when nested in our drawer.
   ::deep because the inner pane is rendered by a child component. */
.chart-drawer[b-d49wzfse5z]  .glass-popup {
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.chart-drawer[b-d49wzfse5z]  .glass-popup::before {
    display: none !important;
}

/* Mobile: stack overlays vertically instead of letting them collide.
   800px (not 768) — the top banner/piece-selector side-by-side only clears above ~800px. */
@media (max-width: 800px) {
    .shipment-banner[b-d49wzfse5z] {
        top: 72px;
        left: 8px;
        right: 8px;
        max-width: none;
    }

    button.shipment-banner.collapsed[b-d49wzfse5z] {
        right: auto;
    }

    /* When piece selector is rendered, it claims the top slot and banner moves below. */
    .shipment-banner:has(~ .piece-selector)[b-d49wzfse5z] {
        top: 124px;
    }

    .piece-selector[b-d49wzfse5z] {
        top: 72px;
        left: 8px;
        right: 8px;
        max-width: none;
        flex-direction: row;
        flex-wrap: nowrap;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 6px 8px;
    }

    .chart-toolbar[b-d49wzfse5z] {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        bottom: 12px;
        right: 8px;
        left: 8px;
        top: auto;
    }

    .chart-drawer[b-d49wzfse5z] {
        width: calc(100% - 16px);
        bottom: 72px;
        padding: 8px 10px;
    }

    /* Touch devices don't need on-screen zoom/compass/fullscreen — pinch & drag is enough.
       ::deep because MapLibre injects these controls into the map container at runtime. */
    .map-container[b-d49wzfse5z]  .maplibregl-ctrl-top-left,
    .map-container[b-d49wzfse5z]  .maplibregl-ctrl-top-right,
    .map-container[b-d49wzfse5z]  .maplibregl-ctrl-bottom-left,
    .map-container[b-d49wzfse5z]  .maplibregl-ctrl-bottom-right {
        display: none !important;
    }
}
