/* tiny vienna. Map palette after the GTA VI map, HUD in Barlow Condensed, Bezirk in a brush script. */
@font-face { font-family: "Barlow Condensed"; src: url(/fonts/barlow-condensed-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(/fonts/barlow-condensed-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(/fonts/barlow-condensed-600-ext.woff2) format("woff2"); font-weight: 600; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; src: url(/fonts/barlow-condensed-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Yellowtail"; src: url(/fonts/yellowtail.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --land: #B5BEC9;
  --hud: rgb(9 15 26 / .82);
  --hud-solid: rgb(9 15 26 / .94);
  --hud-line: rgb(255 255 255 / .14);
  --fg: #F5F8FC;
  --dim: #AEBBCD;
  --ink: #0A121E;
  --hot: #FF3F9B;
  --route: #A64DF0;
  --font-ui: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-script: "Yellowtail", "Brush Script MT", cursive;
  --gap: 12px;
  --edge-l: max(var(--gap), env(safe-area-inset-left, 0px));
  --edge-r: max(var(--gap), env(safe-area-inset-right, 0px));
  --edge-b: max(var(--gap), env(safe-area-inset-bottom, 0px));
  --radar-w: 232px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { overflow: hidden; background: var(--land); color: var(--fg); font-family: var(--font-ui); -webkit-font-smoothing: antialiased; }
#app { position: relative; height: 100%; overflow: hidden; }
#map { position: absolute; inset: 0; background: linear-gradient(#8DBBE8, #C6CFDA 42%, var(--land) 42%); }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; }
.maplibregl-canvas:focus-visible { outline: 2px solid var(--hot); outline-offset: -2px; }
.maplibregl-marker { position: absolute; left: 0; top: 0; will-change: transform; }
.maplibregl-canvas-container.maplibregl-interactive { cursor: grab; }
.maplibregl-canvas-container.maplibregl-interactive:active { cursor: grabbing; }

/* the name of the blip under the pointer */
.tip { position: absolute; left: 0; top: 0; padding: 5px 10px 6px; max-width: 300px; background: var(--hud-solid); font: 700 17px/1.15 var(--font-ui); letter-spacing: .04em; text-transform: uppercase; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: translate(-50%, calc(-100% - 20px)); }
.tip small { display: block; font-weight: 600; font-size: 13px; letter-spacing: .08em; color: var(--dim); }

/* the player and the waypoint */
.player { width: 38px; height: 38px; cursor: grab; filter: drop-shadow(0 1px 1px rgb(10 18 30 / .5)); }
.player svg { display: block; width: 100%; height: 100%; }
.player path { fill: #fff; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.waypoint { width: 28px; height: 37px; cursor: pointer; filter: drop-shadow(0 2px 2px rgb(10 18 30 / .45)); }
.waypoint svg { display: block; width: 100%; height: 100%; }
.waypoint path { fill: var(--route); stroke: #fff; stroke-width: 1.8; }
.waypoint circle { fill: #fff; }
.wp-label { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); padding: 2px 7px 3px; background: var(--hud-solid); color: var(--fg); font: 700 14px/1.1 var(--font-ui); letter-spacing: .05em; white-space: nowrap; }
.wp-label:empty { display: none; }

/* legend, top left */
.legend { position: absolute; left: var(--edge-l); top: var(--gap); width: 232px; max-height: calc(100% - 210px); display: flex; flex-direction: column; background: var(--hud); }
.legend-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px 8px 12px; border: 0; background: none; text-align: left; border-bottom: 1px solid var(--hud-line); }
.legend-title { font: 700 24px/1 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; }
.legend-total { margin-left: auto; font: 600 14px/1 var(--font-ui); letter-spacing: .04em; color: var(--dim); font-variant-numeric: tabular-nums; }
.chev { width: 12px; height: 12px; transition: transform .2s; }
.legend[data-open="false"] .chev { transform: rotate(-90deg); }
.legend[data-open="false"] .legend-list { display: none; }
.legend[data-open="false"] .legend-head { border-bottom: 0; }
.legend-list { list-style: none; margin: 0; padding: 4px 0 6px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .25) transparent; }
.kind { display: flex; align-items: center; gap: 8px; width: 100%; padding: 2px 10px 2px 8px; border: 0; background: none; font: 600 16px/1.3 var(--font-ui); letter-spacing: .05em; text-transform: uppercase; text-align: left; }
.kind:hover { background: rgb(255 255 255 / .08); }
.kind[aria-pressed="false"] { color: rgb(245 248 252 / .38); }
.kind[aria-pressed="false"] img { opacity: .35; filter: grayscale(1); }
.kind[aria-pressed="false"] .n { color: rgb(174 187 205 / .4); }
.kind img { width: 22px; height: 22px; flex: none; margin: -2px 0; }
.kind .dot { width: 22px; flex: none; }
.kind .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kind .n { margin-left: auto; font-weight: 500; font-size: 14px; color: var(--dim); font-variant-numeric: tabular-nums; }
.list-all .kind { padding-top: 4px; padding-bottom: 4px; }
.city-link { color: var(--fg); text-decoration: none; }
.city-link .dot::before { content: ""; display: block; width: 8px; height: 8px; margin: 0 auto; border-radius: 50%; background: var(--route); box-shadow: 0 0 0 2px #fff; }

/* camera, top right */
.controls { position: absolute; right: var(--edge-r); top: var(--gap); display: flex; flex-direction: column; gap: 4px; }
.controls button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; background: var(--hud); font: 700 18px/1 var(--font-ui); letter-spacing: .04em; }
.controls button:hover { background: var(--hud-solid); }
.controls button[aria-pressed="true"] { background: var(--fg); color: var(--ink); }
.controls svg { width: 20px; height: 20px; }
.controls .gap { margin-top: 8px; }
.controls button[data-done="true"] { background: var(--route); }
.controls button[data-busy="true"] svg { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.controls button[data-done="true"]::after { content: "Link kopiert"; position: absolute; right: calc(100% + 8px); padding: 6px 10px; background: var(--hud-solid); color: var(--fg); font: 700 15px/1 var(--font-ui); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.controls button { position: relative; }

/* city markers on the Austria overview */
.city-mark { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; border: 0; background: none; cursor: pointer; }
.city-pin { width: 16px; height: 16px; border-radius: 50%; background: var(--route); box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--ink); order: 2; }
.city-name { padding: 3px 8px 4px; background: var(--hud-solid); color: var(--fg); font: 700 16px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.city-mark:hover .city-name { background: var(--route); }
.city-mark[data-side="left"] .city-name { transform: translateX(-42%); }
.city-mark[data-side="right"] .city-name { transform: translateX(42%); }

/* where each ride starts: the line and its departure */
.ride-badge { display: flex; align-items: center; gap: 4px; padding: 3px 6px 3px 3px; background: var(--hud-solid); color: var(--fg); font: 700 14px/1 var(--font-ui); letter-spacing: .04em; box-shadow: 0 2px 6px rgb(10 18 30 / .35); pointer-events: none; }
.ride-badge .line { min-width: 28px; padding: 3px 5px; font-size: 14px; }

/* legend groups */
.group { padding: 10px 12px 3px; font: 700 12px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

/* info card for a place, right side under the camera buttons */
.card { position: absolute; right: calc(var(--edge-r) + 52px); top: var(--gap); width: 300px; max-height: calc(100% - 200px); overflow-y: auto; padding: 12px 12px 12px; background: var(--hud-solid); }
.card-head { display: flex; align-items: flex-start; gap: 10px; }
.card-head img { width: 34px; height: 34px; flex: none; margin-top: -2px; }
.card-title { flex: 1; min-width: 0; }
.card h2 { margin: 0; font: 700 21px/1.1 var(--font-ui); letter-spacing: .03em; text-transform: uppercase; overflow-wrap: anywhere; }
.card-title p { margin: 3px 0 0; font: 600 14px/1.2 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.card-head button { width: 28px; height: 28px; flex: none; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--dim); }
.card-head button:hover { color: var(--fg); }
.card-head svg { width: 16px; height: 16px; }
.card-lines { display: flex; gap: 6px; margin-top: 10px; }
.line { min-width: 30px; padding: 3px 6px; color: #fff; font: 700 15px/1 var(--font-ui); letter-spacing: .04em; text-align: center; }
.card-status { margin: 10px 0 0; font: 700 16px/1 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.card-status[data-open="true"] { color: #7CE6A2; }
.card-status[data-open="false"] { color: #FF8A8A; }
.card-hours { margin-top: 6px; font: 500 16px/1.35 var(--font-ui); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.card-row { display: block; margin: 8px 0 0; font: 500 16px/1.3 var(--font-ui); letter-spacing: .02em; color: var(--fg); overflow-wrap: anywhere; }
.card-link { color: #9FD4FF; text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.card-route { display: block; width: 100%; margin-top: 12px; padding: 9px 12px; border: 0; background: var(--route); color: #fff; font: 700 17px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; }
.card-route:hover { background: #B566F5; }

/* the trip to the waypoint, top centre */
.trip { position: absolute; left: 50%; top: var(--gap); transform: translateX(-50%); display: flex; flex-direction: column; max-width: min(640px, calc(100% - 140px)); background: var(--hud); }
.trip-row { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; }
.trip-row::before { content: ""; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--route); box-shadow: 0 0 0 2px #fff; }
.trip-to { font: 700 18px/1.1 var(--font-ui); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-dist { flex: none; font: 600 17px/1.1 var(--font-ui); letter-spacing: .04em; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.trip-row > button { flex: none; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--dim); }
.trip-row > button:hover { color: var(--fg); }
.trip svg { width: 16px; height: 16px; }

.trip-modes { display: flex; flex: none; background: rgb(255 255 255 / .08); }
.trip-modes button { padding: 5px 9px; border: 0; background: none; color: var(--dim); font: 700 14px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; }
.trip-modes button[aria-pressed="true"] { background: var(--fg); color: var(--ink); }
.trip-legs { max-height: 40vh; overflow-y: auto; padding: 8px 12px; border-top: 1px solid var(--hud-line); }
.leg { display: flex; align-items: center; gap: 8px; padding: 3px 0; font: 500 15px/1.25 var(--font-ui); letter-spacing: .02em; }
.leg-time { width: 40px; flex: none; color: var(--dim); font-variant-numeric: tabular-nums; }
.leg-walk { padding: 2px 6px; border: 1px dashed var(--dim); color: var(--dim); font: 700 13px/1 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.leg-to { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-deps { margin-top: 10px; }
.deps-head { font: 700 13px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.dep { display: flex; align-items: center; gap: 8px; padding: 3px 0; font: 500 16px/1.2 var(--font-ui); }
.dep .line { min-width: 34px; }
.dep-to { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep-min { color: #7CE6A2; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dep-none { color: var(--dim); font: 500 15px/1.3 var(--font-ui); }

/* radar, bottom left: centred on the player, turning with the camera */
.radar { position: absolute; left: var(--edge-l); bottom: var(--edge-b); width: var(--radar-w); height: 150px; overflow: hidden; background: var(--land); border: 3px solid rgb(9 15 26 / .85); pointer-events: none; }
#radarMap { position: absolute; inset: 0; }
.radar-me { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; will-change: transform; z-index: 2; }
.radar-wp, .radar-n { position: absolute; left: 50%; top: 50%; will-change: transform; }
.radar-wp { width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--route); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink); }
.radar-n { width: 17px; height: 17px; margin: -8.5px 0 0 -8.5px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 13px/17px var(--font-ui); text-align: center; }

/* street and district under the pointer, bottom right */
.where { position: absolute; right: var(--edge-r); bottom: 30px; max-width: min(60%, 540px); display: flex; flex-direction: column; align-items: flex-end; gap: 4px; pointer-events: none; padding-right: 4px; }
.sign { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; font: 600 19px/1.2 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 0 2px var(--ink), 0 1px 2px var(--ink), 1px 0 2px var(--ink), -1px 0 2px var(--ink), 0 -1px 2px var(--ink); }
.sign-nr { font-weight: 700; }
.bezirk { font: 400 52px/1.1 var(--font-script); color: #fff; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; text-shadow: 3px 4px 0 rgb(10 18 30 / .35); padding: 0 6px 6px 0; text-align: right; text-wrap: balance; transition: opacity .25s; }
.bezirk.is-changing { opacity: 0; }

.credit { position: absolute; left: calc(var(--edge-l) + var(--radar-w) + 12px); bottom: 6px; max-width: min(40%, 520px); margin: 0; font: 500 12px/1.3 var(--font-ui); letter-spacing: .04em; color: var(--ink); opacity: .8; }
.credit a { color: inherit; }
.credit-toggle { display: none; }

.notice { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: min(80%, 420px); margin: 0; padding: 14px 18px; background: var(--hud-solid); font: 600 18px/1.35 var(--font-ui); letter-spacing: .03em; text-align: center; }

@media (max-width: 900px) {
  .credit { max-width: calc(100% - var(--radar-w) - 30px - var(--edge-r)); }
  .where { bottom: 48px; }
  .bezirk { font-size: 44px; -webkit-text-stroke-width: 5px; }
}
@media (max-width: 640px) {
  .legend { width: 190px; max-height: calc(100% - 220px); }
  .legend-title { font-size: 20px; }
  .kind { font-size: 15px; }
  .radar { display: none; }
  .tip { display: none !important; }
  /* fewer buttons: pinch zooms, so keep 3D, location, link and the compass */
  .controls #orbit, .controls #zin, .controls #zout, .controls #home { display: none; }
  .controls .gap { margin-top: 0; }
  /* one bottom sheet look for the place card and the trip */
  .card, .trip { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-width: none; transform: none; border-radius: 14px 14px 0 0; background: var(--hud-solid); box-shadow: 0 -6px 24px rgb(10 18 30 / .35); }
  .card::before, .trip::before { content: ""; display: block; width: 40px; height: 4px; margin: 8px auto 4px; border-radius: 2px; background: rgb(255 255 255 / .25); flex: none; }
  .card { max-height: 62%; z-index: 5; padding: 6px 14px 0; }
  .card-route { position: sticky; bottom: 0; margin: 14px -14px 0; width: calc(100% + 28px); padding: 15px 12px calc(15px + env(safe-area-inset-bottom, 0px)); }
  .trip { z-index: 4; max-height: 60%; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .trip-row { flex-wrap: wrap; gap: 8px 10px; padding: 6px 10px 10px 16px; }
  .trip-to { flex: 1; min-width: 0; font-size: 19px; }
  .trip-dist { font-size: 18px; color: var(--fg); }
  .trip-modes { order: 5; flex-basis: 100%; }
  .trip-modes button { flex: 1; padding: 11px 8px; font-size: 15px; }
  .trip-legs { max-height: none; flex: 1; padding: 8px 16px 14px; }
  .leg { font-size: 16px; padding: 5px 0; }
  .card-open .where, .card-open .credit, .card-open .trip, .card-open .credit-toggle,
  .trip-open .where, .trip-open .credit, .trip-open .credit-toggle { display: none; }
  .where { left: var(--edge-l); max-width: none; bottom: max(14px, env(safe-area-inset-bottom, 0px)); padding-left: 40px; }
  .sign { font-size: 16px; }
  .bezirk { font-size: 38px; -webkit-text-stroke-width: 5px; }
  /* sources behind a small i, so the map keeps the bottom edge */
  .credit-toggle { display: grid; place-items: center; position: absolute; left: var(--edge-l); bottom: max(14px, env(safe-area-inset-bottom, 0px)); width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: var(--hud); color: var(--fg); font: 700 17px/1 var(--font-ui); z-index: 3; }
  .credit { display: none; left: var(--edge-l); right: var(--edge-r); max-width: none; bottom: calc(max(14px, env(safe-area-inset-bottom, 0px)) + 38px); padding: 8px 10px; background: rgb(247 244 236 / .95); font-size: 12px; opacity: 1; z-index: 3; }
  .credits-open .credit { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .bezirk, .chev { transition: none; }
}
