/* Transmodal Shipment Tracking: styles scoped to .tmw so the theme is unaffected. */
.tmw {
    --tm-navy: #0d2240;
    --tm-blue: #1f6fb5;
    --tm-blue-soft: #e8f1fa;
    --tm-green: #8cbf3f;
    --ink: #1c2430;
    --ink-soft: #5a6573;
    --line: #dde3ea;
    --bg: #f6f8fa;
    --card: #ffffff;
    --warn-bg: #fff7e6;
    --warn-ink: #7a4b00;
    --err-bg: #fdecec;
    --err-ink: #8a1c1c;
    --est: #8a6d00;
    --radius: 10px;
    --focus: 0 0 0 3px rgba(31, 111, 181, .45);
  }
.tmw { color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.tmw * { box-sizing: border-box; }
/* ---------- widget ---------- */
.tmw { max-width: 920px; margin: 0 auto; padding: 24px 16px 48px; }
.tmw h1 { font-size: 1.6rem; margin: 0 0 4px; color: var(--tm-navy); }
.tmw .sub { margin: 0 0 20px; color: var(--ink-soft); }
.tmw-form { display: flex; gap: 8px; flex-wrap: wrap; }
.tmw-form label { flex-basis: 100%; font-weight: 600; font-size: .95rem; }
.tmw-form input {
  flex: 1 1 260px; min-width: 0; padding: 12px 14px; font-size: 1rem;
  border: 1px solid #b9c3cf; border-radius: var(--radius); background: #fff; color: var(--ink);
}
.tmw-form button {
  padding: 12px 22px; font-size: 1rem; font-weight: 600; color: #fff; cursor: pointer;
  background: var(--tm-blue); border: 0; border-radius: var(--radius);
}
.tmw-form button:hover { background: #185c97; }
.tmw-form .hint { flex-basis: 100%; font-size: .85rem; color: var(--ink-soft); margin: 0; }
 .tmw :is(input, .tmw button, .tmw summary, .tmw [tabindex]):focus-visible { outline: none; box-shadow: var(--focus); }

.tmw-result { margin-top: 24px; }
.tmw .notice { padding: 14px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.tmw .notice strong { display: block; }
.tmw .notice.info { background: var(--tm-blue-soft); }
.tmw .notice.warn { background: var(--warn-bg); color: var(--warn-ink); }
.tmw .notice.err { background: var(--err-bg); color: var(--err-ink); }

.tmw .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.tmw .card h2 { margin: 0 0 4px; font-size: 1.15rem; color: var(--tm-navy); }
.tmw .meta { margin: 0 0 14px; font-size: .85rem; color: var(--ink-soft); }
.tmw .route { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; }
.tmw .route div { border-top: 3px solid var(--tm-blue); padding-top: 8px; }
.tmw .route div:last-child { border-top-color: var(--tm-green); }
.tmw .route dt { font-size: .8rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.tmw .route dd { margin: 0; font-weight: 600; }
.tmw .route .when { display: block; font-weight: 400; font-size: .9rem; }
.tmw .facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 14px 0 0; font-size: .92rem; }
.tmw .facts dt { color: var(--ink-soft); display: inline; }
.tmw .facts dd { display: inline; margin: 0 0 0 4px; font-weight: 600; }

.tmw .badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }
.tmw .badge.est { background: #fff3cc; color: var(--est); }
.tmw .badge.act { background: #e3f3d3; color: #3d6b10; }
.tmw .badge.status { background: var(--tm-blue-soft); color: var(--tm-navy); }

.tmw .containers h3 { font-size: 1rem; margin: 0 0 10px; }
.tmw details.ctr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; background: #fff; }
.tmw details.ctr.searched { border-color: var(--tm-blue); box-shadow: inset 4px 0 0 var(--tm-blue); }
.tmw details.ctr summary {
  list-style: none; cursor: pointer; padding: 14px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
}
.tmw details.ctr summary::-webkit-details-marker { display: none; }
.tmw details.ctr summary::after { content: "▸"; margin-left: auto; color: var(--ink-soft); transition: transform .15s; }
.tmw details.ctr[open] summary::after { transform: rotate(90deg); }
.tmw .ctr-no { font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tmw .ctr-eq { color: var(--ink-soft); font-size: .9rem; }
.tmw .you { font-size: .78rem; font-weight: 600; color: var(--tm-blue); }
.tmw .ctr-body { padding: 0 16px 16px; }
.tmw .ctr-facts { font-size: .9rem; color: var(--ink-soft); margin: 0 0 12px; }

.tmw ol.timeline { list-style: none; margin: 0; padding: 0; }
.tmw .leg { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin: 14px 0 6px; }
.tmw .leg:first-child { margin-top: 0; }
.tmw .ev { position: relative; padding: 0 0 12px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.tmw .ev::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--tm-blue); }
.tmw .ev.est::before { background: #fff; border: 2px solid var(--est); }
.tmw .ev.unknown::before { background: #fff; border: 2px dashed #9aa5b1; }
.tmw .badge.unk { background: #eef1f4; color: var(--ink-soft); }
.tmw .ev { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.tmw .ev-main { min-width: 0; }
.tmw .ev-name { font-weight: 600; }
.tmw .tl-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; align-items: start; }
.tmw .net-days { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--bg); }
.tmw .net-days h4 { margin: 0 0 8px; font-size: .9rem; color: var(--tm-navy); }
.tmw .net-days dl { margin: 0; }
.tmw .net-days dl div { padding: 6px 0; border-top: 1px solid var(--line); }
.tmw .net-days dl div:first-child { border-top: 0; padding-top: 0; }
.tmw .net-days dt { font-size: .8rem; color: var(--ink-soft); }
.tmw .net-days dd { margin: 0; font-weight: 700; font-size: 1.05rem; }
.tmw .net-days .in_progress dd { color: var(--tm-blue); }
.tmw .net-days .not_started dd, .tmw .net-days .unknown dd { font-weight: 400; font-size: .9rem; color: var(--ink-soft); }
.tmw .next-line { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--est); background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0; font-size: .95rem; }
.tmw .p2p { background: var(--tm-navy); color: #fff; border-radius: var(--radius); padding: 14px 18px; margin: 0 0 16px; }
.tmw .p2p-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #b9cde4; }
.tmw .p2p-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 2px 0 8px; }
.tmw .p2p-big { font-size: 1.9rem; font-weight: 700; line-height: 1.15; }
.tmw .p2p-route { font-size: 1.05rem; font-weight: 600; }
.tmw .p2p-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.2); overflow: hidden; margin: 0 0 8px; }
.tmw .p2p-bar span { display: block; height: 100%; background: var(--tm-green); border-radius: 999px; }
.tmw .p2p-sub { font-size: .88rem; color: #dbe6f2; }
/* Themes often indent definition values; the widget's layout does its own spacing. */
.tmw .tmw-result dl, .tmw .tmw-result dd, .tmw .tmw-result dt { margin-left: 0; padding-left: 0; }
.tmw .tmw-result .facts dd { margin-left: 4px; }
.tmw .net-days .note { margin: 8px 0 0; font-size: .75rem; color: var(--ink-soft); }
.tmw .ev-detail { font-size: .88rem; color: var(--ink-soft); }

.tmw .choices { list-style: none; padding: 0; margin: 0; }
.tmw .choices button {
  width: 100%; text-align: left; padding: 14px 16px; margin-bottom: 8px; cursor: pointer; font: inherit; color: inherit;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.tmw .choices button:hover { border-color: var(--tm-blue); }

.tmw .skeleton { height: 14px; background: linear-gradient(90deg, #eef1f4, #f7f9fb, #eef1f4); background-size: 200% 100%; border-radius: 6px; margin: 10px 0; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.tmw .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 600px) {
  .tmw h1 { font-size: 1.35rem; }
  .tmw-form button { flex: 1 1 100%; }
  .tmw .route { grid-template-columns: 1fr; }
  .tmw .card { padding: 14px; }
  .tmw .tl-wrap { grid-template-columns: 1fr; }
}
