/* LiveNetStorm Chaser: live traffic map (rendered by trafficmap.js inside .c-map) */

.c-map.tm-on { position: relative; overflow: hidden; container-type: inline-size; }
.tm-root {
  --l-1: #5b6573; --l0: #1a7f3f; --l1: #e0a915; --l2: #ef8a22; --l3: #e3242b;
  --u: 1;
  position: absolute; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none;
  font-family: var(--cond, "Barlow Condensed", sans-serif); color: #f2f3f5;
}
.tm-root .l-1 { --c: var(--l-1); } .tm-root .l0 { --c: var(--l0); } .tm-root .l1 { --c: var(--l1); } .tm-root .l2 { --c: var(--l2); } .tm-root .l3 { --c: var(--l3); }

/* ---- tiles ---- */
.tm-tiles { position: absolute; inset: 0; }
.tm-base, .tm-flow { position: absolute; inset: 0; }
.tm-tiles img { position: absolute; max-width: none; opacity: 0; transition: opacity .5s; pointer-events: none; image-rendering: auto; }
.tm-tiles img.ok { opacity: 1; }
.tm-base { filter: saturate(.55) brightness(.8) contrast(1.08); }
.tm-schem .tm-tiles { display: none; }

/* ---- svg ---- */
.tm-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: hidden; }
.tm-bg { fill: #0a0d13; }
.tm-ch { fill: #121722; }
.tm-ch-tint { fill: rgba(227, 36, 43, .035); }
.tm-lake-edge path, .tm-lake path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tm-lake-edge path { stroke: #2a5c86; }
.tm-lake-edge ellipse { fill: #2a5c86; }
.tm-lake path { stroke: #0f2a42; }
.tm-lake ellipse { fill: #0f2a42; }

.tm-border-glow { fill: none; stroke: #e3242b; stroke-opacity: .16; stroke-linecap: round; stroke-linejoin: round; }
.tm-border { fill: none; stroke: #f2f3f5; stroke-opacity: .55; stroke-linecap: round; stroke-linejoin: round; }

.tm-cas path { fill: none; stroke: #000; stroke-opacity: .85; stroke-linecap: round; stroke-linejoin: round; }
.tm-roads path, .tm-glow path { fill: none; stroke: var(--c, #5b6573); stroke-linecap: round; stroke-linejoin: round; transition: stroke .6s; }
.tm-roads path.ctx { stroke: #4a5364; }
.tm-glow { opacity: .55; }
.tm-glow path.l0 { stroke-opacity: .45; }
.tm-glow path.l-1 { stroke-opacity: 0; }
.tm-fls path { fill: none; stroke: #fff; stroke-opacity: .75; stroke-linecap: round; animation: tm-flow 1.1s linear infinite; }
.tm-fls path.l1 { animation-duration: 2s; }
.tm-fls path.l2 { animation-duration: 3.4s; }
.tm-fls path.l3 { animation-duration: 6.5s; stroke-opacity: .9; }
.tm-fls path.l-1 { animation-duration: 2.6s; stroke-opacity: .35; }
.tm-roads-live path { stroke-opacity: .55; }
.tm-out .tm-fls path { animation-direction: reverse; }
@keyframes tm-flow { to { stroke-dashoffset: calc(-14.5px * var(--u)); } }

.tm-shield rect { stroke: #fff; stroke-width: 1.2px; }
.tm-shield.ch rect { fill: #d52b1e; }
.tm-shield.it rect { fill: #0b7a3e; }
.tm-shield text { fill: #fff; font-family: var(--cond, sans-serif); font-weight: 700; text-anchor: middle; letter-spacing: .02em; }


.tm-city { fill: #f2f3f5; stroke: #000; stroke-width: 2px; }

.tm-office rect { fill: #e3242b; stroke: #fff; stroke-width: calc(2px * var(--u)); }
.tm-office-halo { fill: #e3242b; fill-opacity: .25; }
.tm-office-ring { fill: none; stroke: #e3242b; stroke-width: 2px; transform-box: fill-box; transform-origin: center; animation: tm-ring 2.6s ease-out infinite; }
@keyframes tm-ring { 0% { transform: scale(.45); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }

.tm-leader { stroke: var(--c); stroke-opacity: .85; }
.tm-dot { fill: var(--c); stroke: #fff; transition: fill .6s; }
.tm-pulse { fill: var(--c); opacity: 0; transform-box: fill-box; transform-origin: center; }
.tm-pin.l2 .tm-pulse, .tm-pin.l3 .tm-pulse { animation: tm-pulse 2.4s ease-out infinite; }
.tm-pin.l2 .tm-pulse.b, .tm-pin.l3 .tm-pulse.b { animation-delay: 1.2s; }
.tm-pin.l3 .tm-pulse { animation-duration: 1.6s; }
.tm-pin.l3 .tm-pulse.b { animation-delay: .8s; }
@keyframes tm-pulse { 0% { transform: scale(1); opacity: .65; } 100% { transform: scale(3.4); opacity: 0; } }

/* ---- HTML labels ---- */
.tm-labels { position: absolute; inset: 0; pointer-events: none; }
.tm-labels > * { position: absolute; white-space: nowrap; }
.tm-cn { font: calc(15px * var(--u)) / 1 var(--head); letter-spacing: .45em; color: rgba(255, 255, 255, .16); }
.tm-live .tm-cn { color: rgba(255, 255, 255, .32); text-shadow: 0 0 4px #000; }
.tm-town { transform: translate(-50%, -50%); font: 600 calc(12px * var(--u)) / 1 var(--cond); letter-spacing: .08em; text-transform: uppercase; color: #6b7585; text-shadow: 0 0 3px #000, 0 0 6px #000; }
.tm-town::before { content: ""; display: inline-block; width: calc(4px * var(--u)); height: calc(4px * var(--u)); border-radius: 50%; background: #6b7585; margin-right: 4px; vertical-align: middle; }
.tm-lk { font: italic 500 calc(13px * var(--u)) / 1 var(--cond); color: #5f8fb8; letter-spacing: .06em; opacity: .9; }

.tm-lugano { transform: translateY(-50%); line-height: 1; }
.tm-lugano b { display: block; font: calc(26px * var(--u)) / 1 var(--head); letter-spacing: .03em; color: #fff; text-shadow: 0 0 1px #000, 0 2px 0 #000, 0 0 12px rgba(0, 0, 0, .9); }
.tm-lugano small { display: inline-block; margin-top: calc(3px * var(--u)); background: #e3242b; color: #fff; font: 700 calc(11px * var(--u)) / 1 var(--cond); letter-spacing: .32em; padding: 2px 3px 2px 7px; }

.tm-cl { display: flex; align-items: center; gap: calc(5px * var(--u)); }
.tm-cl b { font: calc(19px * var(--u)) / 1 var(--head); letter-spacing: .03em; text-transform: uppercase; color: #f2f3f5; text-shadow: 0 0 2px #000, 0 2px 0 #000, 0 0 10px #000; }
.tm-cl.sm b { font: 700 calc(13px * var(--u)) / 1 var(--cond); letter-spacing: .12em; color: #b8c0cc; }
.tm-cl i, .tm-edge i { font: 700 calc(13px * var(--u)) / 1 var(--mono); font-style: normal; color: #fff; background: rgba(0, 0, 0, .8); border-bottom: 2px solid var(--c); padding: 2px 4px 1px; }
.tm-cl i:empty, .tm-edge i:empty { display: none; }

.tm-edge { display: flex; align-items: center; gap: calc(6px * var(--u)); transform: translateX(-50%); background: rgba(0, 0, 0, .78); padding: calc(4px * var(--u)) calc(8px * var(--u)); border: 1px solid #262b36; }
.tm-edge.s { bottom: 0; border-bottom: 0; }
.tm-edge.n { top: 0; border-top: 0; }
.tm-edge b { font: calc(15px * var(--u)) / 1 var(--head); letter-spacing: .05em; }
.tm-edge.n b { font: 700 calc(12px * var(--u)) / 1 var(--cond); letter-spacing: .14em; color: #9aa3b2; }
.tm-edge em { font-style: normal; color: #e3242b; font-size: calc(11px * var(--u)); }
.tm-edge.n em { color: #9aa3b2; }

.tm-x { display: flex; align-items: stretch; background: rgba(0, 0, 0, .9); border-left: calc(5px * var(--u)) solid var(--c); box-shadow: 0 3px 12px rgba(0, 0, 0, .6); line-height: 1; }
.tm-x b { font: 700 calc(15px * var(--u)) / 1 var(--cond); letter-spacing: .04em; text-transform: uppercase; padding: calc(4px * var(--u)) calc(6px * var(--u)); color: #fff; }
.tm-x em { font: 700 calc(14px * var(--u)) / 1 var(--mono); font-style: normal; display: grid; place-items: center; padding: 0 calc(6px * var(--u)); background: var(--c); color: #fff; }
.tm-x em:empty { display: none; }
.tm-x.l1 em, .tm-x.l2 em { color: #111; }
.tm-x.l0 em { background: transparent; color: #3fbf6a; padding-left: 0; }

/* ---- chrome: tag, legend, footer ---- */
.tm-tag { position: absolute; left: calc(10px * var(--u)); top: calc(10px * var(--u)); display: flex; border: 2px solid #e3242b; border-radius: 3px; overflow: hidden; text-transform: uppercase; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.tm-tag b { background: #e3242b; color: #fff; display: flex; align-items: center; gap: 6px; padding: 3px 8px; font: 700 calc(12px * var(--u)) / 1 var(--cond); letter-spacing: .18em; }
.tm-tag b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: tm-blink 1.2s infinite; }
.tm-tag span { background: #000; padding: 4px 10px 3px; font: calc(19px * var(--u)) / 1 var(--head); letter-spacing: .04em; }
.tm-tag.demo { border-color: #e0a915; }
.tm-tag.demo b { background: #e0a915; color: #111; }
.tm-tag.demo b::before { background: #111; }
.tm-tag.off { border-color: #5b6573; }
.tm-tag.off b { background: #5b6573; }
.tm-tag.off b::before { display: none; }
@keyframes tm-blink { 50% { opacity: .25; } }

.tm-legend { position: absolute; left: calc(10px * var(--u)); bottom: calc(10px * var(--u)); display: flex; gap: calc(10px * var(--u)); background: rgba(0, 0, 0, .82); border: 1px solid #262b36; padding: calc(5px * var(--u)) calc(9px * var(--u)); font: 700 calc(12px * var(--u)) / 1 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: #c9ced6; }
.tm-legend span { display: flex; align-items: center; gap: 5px; }
.tm-legend i { width: calc(18px * var(--u)); height: calc(5px * var(--u)); border-radius: 3px; background: var(--c); }
.tm-off .tm-legend { opacity: .55; }

.tm-foot { position: absolute; right: calc(10px * var(--u)); bottom: calc(10px * var(--u)); display: flex; align-items: center; gap: 8px; font: 700 calc(12px * var(--u)) / 1 var(--mono); color: #9aa3b2; }
.tm-foot > span:empty { display: none; }
.tm-time { background: rgba(0, 0, 0, .82); border: 1px solid #262b36; padding: calc(5px * var(--u)) calc(8px * var(--u)); letter-spacing: .04em; }
.tm-note { background: rgba(0, 0, 0, .82); border: 1px solid #262b36; padding: calc(5px * var(--u)) calc(8px * var(--u)); font: 600 calc(13px * var(--u)) / 1 var(--cond); letter-spacing: .04em; color: #9aa3b2; }
.tm-attr { display: none; font: 600 10px var(--cond); color: rgba(255, 255, 255, .55); }
.tm-live .tm-attr { display: inline; }

/* off: neutral roads */
.tm-off .tm-fls { display: none; }

/* narrow map (phone): legend and time become one bottom bar */
@container (max-width: 559px) {
  .tm-legend { left: 0; right: 0; bottom: 0; border-width: 1px 0 0; gap: 8px; letter-spacing: .03em; padding: 6px 8px; font-size: 11px; }
  .tm-legend i { width: 10px; height: 4px; }
  .tm-foot { right: 0; bottom: 0; }
  .tm-time, .tm-note { border: 0; background: transparent; font-size: 11px; padding: 6px 8px; }
  .tm-note { font-size: 12px; }
  .tm-edge.s { bottom: 24px; border-bottom: 1px solid #262b36; }
  .tm-tag { left: 8px; top: 8px; }
  .tm-tag b { font-size: 10px; padding: 2px 6px; letter-spacing: .14em; }
  .tm-tag span { font-size: 15px; padding: 3px 7px 2px; }
  .tm-x b { letter-spacing: 0; padding: 3px 5px; }
  .tm-cn { font: calc(15px * var(--u)) / 1 var(--head); letter-spacing: .45em; color: rgba(255, 255, 255, .16); }
.tm-live .tm-cn { color: rgba(255, 255, 255, .32); text-shadow: 0 0 4px #000; }
.tm-town { transform: translate(-50%, -50%); font: 600 calc(12px * var(--u)) / 1 var(--cond); letter-spacing: .08em; text-transform: uppercase; color: #6b7585; text-shadow: 0 0 3px #000, 0 0 6px #000; }
.tm-town::before { content: ""; display: inline-block; width: calc(4px * var(--u)); height: calc(4px * var(--u)); border-radius: 50%; background: #6b7585; margin-right: 4px; vertical-align: middle; }
.tm-lk { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.kiosk) .tm-fls path, .tm-pulse, .tm-office-ring, .tm-tag b::before { animation: none !important; }
}
