/* Navo Transport (12.11.2026). Uses NAVO design tokens from navo-ds.css. */
:root {
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --panel-w: 404px; --edge: 20px;
  --k-container: #113EC9; --k-truck: #0E9F6E; --k-wagon: #B45309; --k-vessel: #0284C7; --k-plane: #7044EC; --k-warehouse: #DB2777;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; font-family: var(--font-sans); color: var(--text-primary); background: var(--bg-sunken); -webkit-font-smoothing: antialiased; }
#map { position: fixed; inset: 0; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; color: inherit; cursor: pointer; }

.pane {
  position: fixed; z-index: 5; top: calc(var(--edge) + var(--safe-t)); left: calc(var(--edge) + var(--safe-l)); bottom: var(--edge);
  width: var(--panel-w); display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--bg-raised) 92%, transparent); backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--border-default); border-radius: 24px; box-shadow: var(--shadow-3); overflow: hidden;
}
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.brand img { border-radius: 8px; }
.pane-sub { font-size: 13px; color: var(--text-tertiary); white-space: nowrap; }

.srow { position: relative; display: flex; gap: 8px; padding: 4px 16px 10px; }
.sbox { position: relative; flex: 1; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 8px 0 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--bg-base); color: var(--text-tertiary); }
.sbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.sbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 15px; color: var(--text-primary); }
.sbox input::-webkit-search-cancel-button { display: none; }
.sx { border: 0; background: none; padding: 6px; border-radius: 999px; display: grid; place-items: center; color: var(--text-secondary); }
.sx:hover { background: var(--bg-sunken); }
.sugg { position: absolute; z-index: 20; top: 48px; left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--bg-raised); border: 1px solid var(--border-default); border-radius: 16px; box-shadow: var(--shadow-4); max-height: 320px; overflow: auto; }
.sugg li { display: flex; gap: 10px; align-items: baseline; padding: 9px 10px; border-radius: 10px; cursor: pointer; color: var(--text-primary); font-size: 14px; }
.sugg li small { color: var(--text-tertiary); margin-left: auto; font-family: var(--font-mono); font-size: 12px; }
.sugg li[aria-selected=true], .sugg li:hover { background: var(--accent-wash); }
.fbtn { position: relative; width: 44px; height: 44px; flex: none; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-base); display: grid; place-items: center; color: var(--text-secondary); }
.fbtn:hover, .fbtn[aria-expanded=true] { color: var(--accent); border-color: var(--accent); background: var(--accent-wash); }
.badge { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--brand-red); color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; border: 2px solid var(--bg-raised); }

.fpop { position: absolute; z-index: 30; top: 56px; left: 16px; right: 16px; padding: 14px; background: var(--bg-raised); border: 1px solid var(--border-default); border-radius: 20px; box-shadow: var(--shadow-4); max-height: min(70vh, 560px); overflow: auto; }
.fpop h4 { margin: 12px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-tertiary); }
.fpop h4:first-child { margin-top: 0; }
.seg { display: flex; padding: 3px; background: var(--bg-sunken); border-radius: 999px; }
.seg button { flex: 1; border: 0; background: none; height: 34px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.seg button[aria-pressed=true] { background: var(--bg-raised); color: var(--text-primary); box-shadow: var(--shadow-1); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-default); background: var(--bg-base); font-size: 13px; color: var(--text-secondary); }
.chip .dot { width: 8px; height: 8px; border-radius: 99px; }
.chip img { width: 16px; height: 16px; border-radius: 4px; }
.chip[aria-pressed=true] { border-color: var(--accent); background: var(--accent-wash); color: var(--accent); font-weight: 600; }
.fpop-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-default); }
.btn { height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-base); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text-primary); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:hover { box-shadow: var(--shadow-1); }

.near { margin: -2px 16px 8px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.near b { color: var(--text-primary); font-weight: 600; }
.near button { border: 0; background: none; color: var(--accent); padding: 0; font-size: 13px; }

.body { position: relative; flex: 1; min-height: 0; overflow: auto; border-top: 1px solid var(--border-default); }
.list { list-style: none; margin: 0; padding: 6px 8px 12px; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; cursor: pointer; }
.list li:hover, .list li.on { background: var(--accent-wash); }
.list .ico { width: 64px; height: 40px; flex: none; display: grid; place-items: center; }
.list .ico img { max-width: 64px; max-height: 40px; }
.list .tx { min-width: 0; flex: 1; }
.list .t { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .s { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .empty { display: block; cursor: default; color: var(--text-secondary); font-size: 14px; padding: 24px 12px; }
.list .empty:hover { background: none; }
.st { flex: none; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--bg-sunken); color: var(--text-secondary); text-transform: capitalize; white-space: nowrap; }
.st.g { background: #E7F7EF; color: #0B7A55; } .st.b { background: var(--accent-wash); color: var(--accent); } .st.a { background: #FFF4E5; color: #A15C07; }

.card { padding: 0 0 18px; }
.card-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--bg-raised); border-bottom: 1px solid var(--border-default); }
.card-top .back { border: 0; background: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 999px; font-size: 14px; color: var(--text-secondary); }
.card-top .back:hover { background: var(--bg-sunken); }
.card .ph { margin: 0; aspect-ratio: 16 / 9; background: var(--bg-sunken); overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .hd { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px 6px; }
.card .hd .ico { flex: none; width: 72px; display: grid; place-items: center; padding-top: 2px; }
.card .hd .ico img { max-width: 72px; max-height: 48px; }
.card h1 { margin: 0; font-family: var(--font-display); font-size: 21px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
.card .sub { margin-top: 4px; color: var(--text-secondary); font-size: 14px; }
.kv { margin: 8px 18px 0; display: grid; grid-template-columns: 112px 1fr; border-top: 1px solid var(--border-default); }
.kv dt, .kv dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--border-default); font-size: 14px; }
.kv dt { color: var(--text-tertiary); }
.kv dd { color: var(--text-primary); min-width: 0; }
.kv .num { font-family: var(--font-mono); font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.kv .num button { border: 0; background: none; padding: 2px; color: var(--text-tertiary); display: inline-grid; }
.kv .ln { display: inline-flex; align-items: center; gap: 8px; }
.kv .ln img { width: 20px; height: 20px; border-radius: 5px; }
.mono { font-family: var(--font-mono); font-size: 13px; }
.note { margin: 14px 18px 0; padding: 12px 14px; border-radius: 14px; background: var(--bg-sunken); font-size: 14px; line-height: 1.5; }
.card h3 { margin: 18px 18px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-tertiary); font-weight: 600; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 18px 0; }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 18px; height: 0; border-top: 3px solid; }
.legend i.d { border-top-style: dashed; }

.foot { display: flex; gap: 14px; align-items: center; padding: 10px 18px calc(10px + var(--safe-b)); border-top: 1px solid var(--border-default); font-size: 12px; color: var(--text-tertiary); }
.foot a { color: var(--text-secondary); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.foot a .ic { width: 14px; height: 14px; }
.foot span { margin-right: auto; }

.maplibregl-ctrl-group { border-radius: 14px !important; box-shadow: var(--shadow-2) !important; }

@media (max-width: 720px) {
  :root { --edge: 0px; }
  .pane { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 52vh; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .pane.open { height: 72vh; }
  .pane-head { padding: 12px 16px 6px; }
  .brand { font-size: 19px; }
  .pane.open .foot, .pane.open .srow, .pane.open .near, .pane.open .pane-head { display: none; }
  .pane.open .body { border-top: 0; }
  .card h1 { font-size: 19px; }
  .kv { grid-template-columns: 96px 1fr; }
  .card .hd .ico { width: 60px; }
  .card .hd .ico img { max-width: 60px; }
  .maplibregl-ctrl-top-right { margin-top: var(--safe-t); }
}

/* markers: livery containers (2-3x the old 22px pin), kind pins for the rest */
.mk { border: 0; background: none; padding: 0; cursor: pointer; line-height: 0; filter: drop-shadow(0 2px 3px rgba(16, 24, 40, .35)); transition: transform .15s; }
.mk:hover { transform: scale(1.12); z-index: 3; }
.mk.on { transform: scale(1.3); z-index: 4; filter: drop-shadow(0 0 0 #fff) drop-shadow(0 3px 6px rgba(16, 24, 40, .5)); }
.mk .box { display: block; }
.pin { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; background: var(--c); color: #fff; border: 2.5px solid #fff; }
.pin .ic { stroke: #fff; }
.list .ico .pin { width: 36px; height: 36px; }
.card .hd .ico .pin { width: 44px; height: 44px; }
.mono { font-family: var(--font-mono); font-size: 13px; color: var(--text-tertiary); }
