.shipment-mini-timeline {
    width: 100%;
    min-width: 0;
    color: var(--app-text, #172033);
}

.shipment-mini-timeline[hidden] {
    display: none;
}

.shipment-mini-timeline__scroll {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    border: 1px solid color-mix(in srgb, var(--app-border, #cbd5e1) 76%, transparent);
    border-radius: 9px;
    background: color-mix(in srgb, var(--app-surface, #ffffff) 94%, #eef4fb);
}

.shipment-mini-timeline__grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(68px, 1fr);
    min-width: max-content;
}

.shipment-mini-timeline__day {
    display: grid;
    grid-template-rows: 19px minmax(25px, auto) minmax(25px, auto);
    min-width: 68px;
    border-right: 1px solid color-mix(in srgb, var(--app-border, #cbd5e1) 60%, transparent);
    background: color-mix(in srgb, var(--app-surface, #ffffff) 97%, #e9f0f8);
}

.shipment-mini-timeline__day.has-gap-before {
    border-left: 2px dashed color-mix(in srgb, var(--app-muted, #64748b) 62%, transparent);
}

.shipment-mini-timeline__day:last-child {
    border-right: 0;
}

.shipment-mini-timeline__day.is-weekend {
    background: color-mix(in srgb, var(--app-surface, #ffffff) 84%, #e9e3f3);
}

.shipment-mini-timeline__date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 2px 4px;
    border-bottom: 1px solid color-mix(in srgb, var(--app-border, #cbd5e1) 60%, transparent);
    color: var(--app-muted, #64748b);
    font-size: 10px;
    line-height: 1;
}

.shipment-mini-timeline__date strong {
    color: var(--app-text, #172033);
    font-size: 11px;
}

.shipment-mini-timeline__cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    padding: 2px 3px;
}

.shipment-mini-timeline__cell--upper {
    border-bottom: 1px dashed color-mix(in srgb, var(--app-border, #cbd5e1) 56%, transparent);
}

.shipment-mini-timeline__event {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 18px;
    padding: 2px 4px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #334155;
    background: #edf2f7;
    font: inherit;
    font-size: 10px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.shipment-mini-timeline__event.is-previous {
    color: #667085;
    background: #e7eaf0;
    opacity: .68;
}

.shipment-mini-timeline__event.is-current {
    color: #0b3c6f;
    border-color: #7db3e8;
    background: #dceeff;
    box-shadow: 0 0 0 1px rgba(47, 128, 209, .08);
}

.shipment-mini-timeline__event.is-next {
    color: #52647a;
    border-color: #d3deea;
    background: #f1f6fb;
}

.shipment-mini-timeline__event.is-conflict::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: #dc2626;
}

.shipment-mini-timeline__event:hover,
.shipment-mini-timeline__event:focus-visible {
    opacity: 1;
    outline: 2px solid rgba(47, 128, 209, .28);
    outline-offset: 1px;
}

.shipment-mini-timeline__flag.flag {
    flex: 0 0 auto;
    width: 12px;
    height: 8px;
}

.shipment-mini-timeline__postal {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.start-suggestion .shipment-mini-timeline {
    grid-column: 1 / -1;
    margin-top: 7px;
}

.stop-card--start-summary .shipment-mini-timeline {
    margin-top: 9px;
}

.ai-review-card .shipment-mini-timeline {
    grid-column: 1 / -1;
    margin-top: 9px;
}

.ai-review-timeline-wide {
    grid-column: 1 / -1;
    min-width: 0;
}

.ai-review-with-pdf .shipment-mini-timeline__scroll {
    border-color: #748399;
    border-radius: 1px;
}

.shipment-order-form .shipment-mini-timeline--stops-wide {
    grid-column: 1;
    order: 0;
    min-width: 0;
    margin: 0 0 2px;
}

@media (max-width: 760px) {
    .shipment-order-form .shipment-mini-timeline--stops-wide {
        grid-column: 1;
    }
}

html[data-app-theme="dark"] .shipment-mini-timeline__event.is-previous {
    color: #e0e5ec;
    background: #58616f;
}

html[data-app-theme="dark"] .shipment-mini-timeline__event.is-current {
    color: #f3f8ff;
    border-color: #91bdeb;
    background: #376b9f;
}

html[data-app-theme="dark"] .shipment-mini-timeline__event.is-next {
    color: #eef4fb;
    border-color: #718093;
    background: #657184;
}
