/* Scoped to the shipment Timeline tab; shares the portal's card, icon and colour tokens. */
.shipment-route-timeline { --route-blue: var(--app-blue, #1267ff); gap: 18px; max-width: none; }
.shipment-route-timeline .shipment-detail-card { min-width: 0; box-shadow: none; padding: 24px; }
.shipment-route-timeline h2 { margin: 0; font-size: 18px; font-weight: 650; line-height: 1.4; letter-spacing: -.025em; }
.shipment-route-timeline p { line-height: 1.6; }
.shipment-route-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.shipment-route-heading p { margin: 4px 0 0; color: var(--shipment-muted); font-size: 13px; }
.shipment-route-meta { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px 16px; }
.shipment-route-meta > small { color: var(--shipment-muted); font-size: 11px; }
.shipment-route-status { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; background: color-mix(in srgb, var(--route-blue) 8%, var(--shipment-surface)); color: var(--route-blue); padding: 7px 12px; font-size: 12px; white-space: nowrap; font-weight: 600; }
.shipment-route-status > i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.shipment-route-status.is-success { color: #16805b; background: #ecf8f2; }
.shipment-route-status.is-attention { color: #ad6011; background: #fff4e5; }
.shipment-route-map { position: relative; isolation: isolate; height: clamp(280px, 25vw, 360px); overflow: hidden; border-radius: 10px; background: #eaf3f9; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.shipment-route-connectors { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; fill: none; stroke: #93a8bd; stroke-width: 1; opacity: .65; }
.shipment-route-location.is-complete > i { background: var(--route-blue); }
.shipment-route-geography { display: block; width: 100%; height: 100%; }
.shipment-route-geography image { opacity: .34; filter: sepia(1) saturate(.8) hue-rotate(165deg); }
.shipment-route-line { fill: none; stroke-width: 2.3; vector-effect: non-scaling-stroke; }
.shipment-route-line.is-done { stroke: var(--route-blue); }
.shipment-route-line.is-active { stroke: var(--route-blue); stroke-dasharray: 5 6; }
.shipment-route-line.is-future { stroke: #93a8bd; stroke-dasharray: 5 6; }
.shipment-route-location { position: absolute; z-index: 2; width: 18px; height: 18px; padding: 0; transform: translate(-50%, -50%); border: 0; background: none; color: #122d4b; cursor: pointer; font: inherit; text-align: left; }
.shipment-route-location > i { display: block; width: 18px; height: 18px; border: 3px solid white; border-radius: 50%; background: #728ca6; box-shadow: 0 0 0 6px #ffffff55; }
.shipment-route-location.is-current > i { background: var(--route-blue); box-shadow: 0 0 0 7px #1267ff20, 0 0 0 13px #1267ff0b; }
.shipment-route-location-card { position: absolute; display: grid; gap: 2px; width: max-content; max-width: 150px; min-width: 88px; padding: 9px 12px; border: 1px solid #dbe7f1; border-radius: 8px; background: #fff; }
.shipment-route-location-card strong { display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.shipment-route-location-card strong > span { font-size: 14px; }
.shipment-route-location-card > span { font-size: 11px; color: #748398; overflow-wrap: anywhere; }
.shipment-route-location-card small { font-size: 10px; color: #748398; }
.shipment-route-location-card em { position: absolute; bottom: calc(100% + 5px); left: 0; padding: 4px 8px; border-radius: 5px; background: var(--route-blue); color: #fff; font-size: 10px; font-style: normal; white-space: nowrap; }
.shipment-route-location:focus-visible { outline: 3px solid var(--route-blue); outline-offset: 3px; border-radius: 50%; z-index: 4; }
.shipment-route-location:hover { z-index: 4; }
.shipment-route-location:hover .shipment-route-location-card { border-color: var(--route-blue); }
.shipment-route-vehicle { position: absolute; z-index: 3; display: grid; justify-items: center; transform: translate(-50%, -50%); pointer-events: none; color: var(--route-blue); }
.shipment-route-vehicle > svg { width: 29px; height: 29px; padding: 3px; border-radius: 50%; background: #fff; fill: none; stroke: currentColor; stroke-width: 1.7; }
.shipment-route-vehicle > span { position: absolute; top: 32px; width: max-content; max-width: 150px; padding: 4px 7px; border-radius: 5px; background: #fff; font-size: 10px; text-align: center; }
.shipment-route-controls { position: absolute; z-index: 5; right: 12px; bottom: 42px; display: grid; border: 1px solid #dbe3ed; border-radius: 6px; overflow: hidden; background: white; }
.shipment-route-controls .shipment-icon-button { width: 32px; height: 32px; min-height: 32px; border: 0; border-radius: 0; background: white; color: #33475e; font-size: 20px; }
.shipment-route-controls button + button { border-top: 1px solid #e6ecf2; }
.shipment-route-controls button:disabled { opacity: .4; cursor: default; }
.shipment-route-controls svg { width: 16px; height: 16px; }
.shipment-route-map-note { position: absolute; bottom: 8px; left: 12px; right: 12px; margin: 0; color: #6f8397; font-size: 10px; }
.shipment-route-selected { position: absolute; top: 10px; left: 10px; right: 10px; width: fit-content; max-width: calc(100% - 20px); border-radius: 5px; background: #fff; color: #33475e; padding: 5px 9px; font-size: 11px; z-index: 5; }
.shipment-route-selected:empty { display: none; }
.shipment-route-progress { overflow-x: auto; padding: 27px 2px 0; }
.shipment-route-progress ol { display: flex; min-width: 590px; margin: 0; padding: 0; list-style: none; }
.shipment-route-progress li { position: relative; flex: 1; display: grid; justify-items: center; gap: 6px; min-width: 95px; font-size: 12px; text-align: center; }
.shipment-route-progress li:not(:last-child)::after { content: ''; position: absolute; top: 11px; left: calc(50% + 16px); width: calc(100% - 32px); border-top: 2px dashed var(--shipment-border); }
.shipment-route-progress li.is-done:not(:last-child)::after { border-top: 2px solid var(--route-blue); }
.shipment-route-step { display: grid; place-items: center; box-sizing: border-box; width: 23px; height: 23px; border: 2px solid #bdc8d5; border-radius: 50%; background: var(--shipment-surface); margin-bottom: 5px; }
.shipment-route-step svg { width: 23px; height: 23px; stroke: white; stroke-width: 1.8; fill: none; }
.shipment-route-step svg circle { display: none; }
.shipment-route-progress .is-done .shipment-route-step { border-color: var(--route-blue); background: var(--route-blue); }
.shipment-route-progress .is-current .shipment-route-step { background: var(--route-blue); border: 4px solid var(--shipment-surface); outline: 2px solid color-mix(in srgb, var(--route-blue) 40%, transparent); }
.shipment-route-progress strong { font-weight: 550; }
.shipment-route-progress small { color: var(--shipment-muted); font-size: 11px; }
.shipment-route-lower { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.shipment-route-updates ol { margin: 22px 0 0; padding: 0; list-style: none; }
.shipment-route-updates li { display: grid; position: relative; grid-template-columns: 36px 96px minmax(0, 1fr); align-items: start; gap: 16px; padding-bottom: 24px; }
.shipment-route-updates li[hidden] { display: none; }
.shipment-route-updates li:not(:last-child)::before { content: ''; position: absolute; top: 35px; bottom: 0; left: 17px; width: 1px; background: var(--shipment-border); }
.shipment-route-updates li > i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--route-blue); background: color-mix(in srgb, var(--route-blue) 7%, var(--shipment-surface)); }
.shipment-route-updates li > i svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.shipment-route-updates time { padding-top: 2px; color: var(--shipment-muted); font-size: 11px; line-height: 1.6; }
.shipment-route-updates time span { display: block; }
.shipment-route-updates h3 { margin: 0; font-size: 13px; line-height: 1.6; font-weight: 600; }
.shipment-route-updates li p { margin: 3px 0 0; color: var(--shipment-muted); font-size: 12px; }
.shipment-route-updates .shipment-view-all { margin-top: 0; color: var(--route-blue); }
.shipment-route-explanation-heading { display: flex; gap: 12px; align-items: center; }
.shipment-route-explanation-heading svg { flex-shrink: 0; width: 21px; height: 21px; color: var(--route-blue); fill: none; stroke: currentColor; stroke-width: 1.7; }
.shipment-route-explanation > p { margin: 20px 0; color: var(--shipment-muted); font-size: 13px; }
.shipment-route-next { display: grid; gap: 7px; padding: 16px; border-radius: 8px; background: color-mix(in srgb, var(--route-blue) 4%, var(--shipment-surface)); }
.shipment-route-next small { color: var(--shipment-muted); font-size: 11px; }
.shipment-route-next strong { font-size: 12px; font-weight: 550; }
.shipment-route-explanation dl { display: grid; gap: 12px; margin: 22px 0 0; font-size: 11px; }
.shipment-route-explanation dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.shipment-route-explanation dt { color: var(--shipment-muted); }
.shipment-route-explanation dd { margin: 0; }
.shipment-route-empty { color: var(--shipment-muted); font-size: 13px; margin: 24px 0; }
.shipment-route-fallback { min-height: 300px; display: grid; align-content: center; justify-items: center; padding: 32px; border-radius: 10px; background: color-mix(in srgb, var(--route-blue) 3%, var(--shipment-surface)); text-align: center; }
.shipment-route-fallback > svg { width: 30px; height: 30px; color: var(--route-blue); fill: none; stroke: currentColor; stroke-width: 1.5; }
.shipment-route-fallback h3 { margin: 14px 0 0; font-size: 16px; font-weight: 600; }
.shipment-route-fallback p { max-width: 480px; font-size: 12px; color: var(--shipment-muted); }
.shipment-route-fallback ol { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin: 18px 0 0; padding: 0; list-style: none; }
.shipment-route-fallback li { display: grid; gap: 5px; min-width: 130px; max-width: 230px; padding: 14px 20px; border: 1px solid var(--shipment-border); border-radius: 8px; background: var(--shipment-surface); overflow-wrap: anywhere; }
.shipment-route-fallback strong { font-size: 15px; }
.shipment-route-fallback li > span, .shipment-route-fallback small { font-size: 12px; color: var(--shipment-muted); }
.shipment-route-fallback em { font-size: 10px; font-style: normal; color: var(--route-blue); }
@media (max-width: 1050px) {
  .shipment-route-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .shipment-route-meta { justify-content: flex-start; }
  .shipment-route-lower { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .shipment-route-timeline .shipment-detail-card { padding: 16px; }
  .shipment-route-timeline h2 { font-size: 16px; }
  .shipment-route-heading p { font-size: 12px; }
  .shipment-route-map { height: 280px; }
  .shipment-route-location-card { padding: 6px 8px; min-width: 64px; max-width: 105px; }
  .shipment-route-location-card strong { font-size: 12px; gap: 6px; }
  .shipment-route-location-card > span { display: none; }
  .shipment-route-location-card small { font-size: 9px; }
  .shipment-route-location-card em { font-size: 9px; }
  .shipment-route-controls { display: flex; bottom: 10px; right: 10px; }
  .shipment-route-controls .shipment-icon-button { width: 28px; height: 28px; min-height: 28px; }
  .shipment-route-controls button + button { border-top: 0; border-left: 1px solid #e6ecf2; }
  .shipment-route-map-note { right: 106px; font-size: 9px; }
  .shipment-route-updates li { grid-template-columns: 30px minmax(0, 1fr); gap: 2px 12px; padding-bottom: 23px; }
  .shipment-route-updates li > i { grid-row: span 2; width: 30px; height: 30px; }
  .shipment-route-updates li::before { left: 14px !important; }
  .shipment-route-updates time { display: flex; gap: 8px; font-size: 10px; }
  .shipment-route-updates li > div { grid-column: 2; }
  .shipment-route-fallback { padding: 24px 12px; }
  .shipment-route-fallback ol { width: 100%; gap: 12px; }
  .shipment-route-fallback li { width: 100%; max-width: none; }
}

.shipment-route-map.is-dragging,
.shipment-route-map.is-dragging .shipment-route-location { cursor: grabbing; }
.shipment-route-map:focus-visible { outline: 2px solid var(--route-blue); outline-offset: 3px; }

/* Real portal door addresses remain legible next to the airport route. */
.shipment-route-location.is-address > i { display: grid; place-items: center; }
.shipment-route-location.is-address > i svg { width: 10px; height: 10px; stroke: white; stroke-width: 2; fill: none; }
.shipment-route-location.is-address .shipment-route-location-card { max-width: 180px; }
@media (max-width: 600px) {
  .shipment-route-map:has(.shipment-route-location.is-address) { height: 310px; }
  .shipment-route-location.is-address .shipment-route-location-card { max-width: 126px; }
  .shipment-route-location-card > .shipment-route-address { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 9px; }
}
