/* wein-iq.com/live-map: a side panel (directions, routes) beside a full-height map; stacked on phones. */
.lm-body { overflow: hidden; }
.lm { display: grid; grid-template-columns: 400px 1fr; height: 100dvh; }
.lm-panel {
  position: relative; z-index: 2; overflow-y: auto; padding: 16px 20px 24px;
  background: var(--surface); border-inline-end: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
}
.lm-top { display: flex; align-items: center; justify-content: space-between; }
.lm-top .brand { font-size: 20px; }
.lm-top .brand img { width: 32px; height: 32px; }
.lm-panel h1 { font-size: 24px; font-weight: 800; margin: 4px 0 0; }

.lm-fields { position: relative; display: flex; align-items: stretch; gap: 10px; }
.lm-rail { display: flex; flex-direction: column; align-items: center; padding: 18px 0; }
.lm-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.lm-dot-from { border: 3px solid var(--sky-2); }
.lm-dot-to { background: var(--orange); }
.lm-dots { flex: 1; width: 0; border-inline-start: 2px dotted var(--muted); margin: 4px 0; }
.lm-inputs { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lm-field { position: relative; display: flex; align-items: center; }
.lm-field input {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 13px 14px; padding-inline-end: 44px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--bg);
}
.lm-field input:focus { outline: none; border-color: var(--sky-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sky-2) 22%, transparent); }
.lm-field input::-webkit-search-cancel-button { display: none; }
.lm-icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0;
  background: transparent; color: var(--muted); cursor: pointer;
}
.lm-icon-btn:hover { color: var(--sky-2); background: color-mix(in srgb, var(--sky-2) 10%, transparent); }
.lm-icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lm-field .lm-icon-btn { position: absolute; inset-inline-end: 4px; }
.lm-swap { align-self: center; }

.lm-suggest {
  position: absolute; z-index: 5; inset-inline: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  max-height: 360px; overflow-y: auto;
}
.lm-suggest li { padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.lm-suggest li[aria-selected="true"], .lm-suggest li:hover { background: var(--tint); }
.lm-suggest b { display: block; font-weight: 600; }
.lm-suggest small { color: var(--muted); font-size: 13px; }

.lm-hint { color: var(--muted); font-size: 15px; }
.lm-error { color: #d33; font-size: 15px; }
.lm-routes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lm-route {
  width: 100%; text-align: start; font: inherit; color: inherit; cursor: pointer;
  padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg);
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
}
.lm-route[aria-pressed="true"] { border-color: var(--sky-2); box-shadow: 0 0 0 2px color-mix(in srgb, var(--sky-2) 35%, transparent); background: var(--surface); }
.lm-route .t { font-size: 22px; font-weight: 800; }
.lm-route .d { color: var(--muted); align-self: center; }
.lm-route .via { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
.lm-route .late { grid-column: 1 / -1; color: #e5322d; font-size: 14px; font-weight: 600; }
.lm-route .best { color: #1f9d55; font-size: 13px; font-weight: 700; }
.lm-actions { display: flex; gap: 10px; }
.btn-ghost-dark { border: 1px solid var(--line); color: var(--ink); background: transparent; font: inherit; cursor: pointer; }
.btn-ghost-dark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

.lm-app { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.lm-app .badges { margin-top: 10px; }
.lm-app .badge img { height: 40px; }

.lm-map-wrap { position: relative; }
.lm-map { position: absolute; inset: 0; }
.lm-legend {
  position: absolute; z-index: 2; inset-block-start: 14px; inset-inline-start: 14px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 14px; border-radius: 999px;
  background: rgba(var(--shade), 0.9); box-shadow: var(--shadow); font-size: 13px; font-weight: 600;
}
.lm-key { display: inline-flex; align-items: center; gap: 6px; }
.lm-key i { width: 18px; height: 5px; border-radius: 3px; display: inline-block; }
/* The app's day traffic colours, as live-map.js TRAFFIC_COLORS. */
.lm-key-slow { background: #F3B81F; }
.lm-key-heavy { background: #EA7836; }
.lm-key-jam { background: #F04242; }
.lm-key-standstill { background: #B71C1C; }
.lm-zoom-hint { color: var(--muted); font-weight: 500; }
/* The drivers' switch: a face, its name and how many are in view; dimmed when off. */
.lm-drivers {
  font: inherit; color: inherit; cursor: pointer; border: 0; background: transparent;
  margin: -4px -6px; padding: 2px 6px; padding-inline-end: 8px; border-radius: 999px; gap: 4px;
}
.lm-drivers:hover { background: color-mix(in srgb, var(--sky-2) 12%, transparent); }
.lm-drivers:focus-visible { outline: 2px solid var(--sky-2); outline-offset: 1px; }
.lm-drivers img { width: 22px; height: 22px; margin-block: -4px; }
.lm-drivers[aria-pressed="false"] { opacity: 0.55; }
.lm-drivers[aria-pressed="false"] img { filter: grayscale(1); }
.lm-count { min-width: 1.4em; padding: 0 6px; border-radius: 999px; text-align: center; background: var(--sky-2); color: #fff; font-size: 12px; line-height: 18px; }

/* Map pins: reports and cameras (HTML markers). */
.lm-pin {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; line-height: 1;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); border: 2px solid #fff; cursor: pointer;
}
.lm-pin-report { background: #ffd23f; }
.lm-pin-police { background: #4f7cf6; }
.lm-pin-camera { width: 24px; height: 24px; font-size: 12px; background: #263445; }
.lm-end { width: 18px; height: 18px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.lm-end-from { background: var(--sky-2); }
.lm-end-to { background: var(--orange); }
.maplibregl-popup-content { font-family: "Rubik", system-ui, sans-serif; border-radius: 12px; padding: 10px 14px; color: #0b1b2b; }
.lm-pop b { display: block; font-size: 15px; }
.lm-pop small { color: #526273; }

@media (max-width: 860px) {
  .lm-body { overflow: auto; }
  .lm { grid-template-columns: 1fr; grid-template-rows: auto 62dvh; height: auto; }
  .lm-panel { border-inline-end: 0; border-bottom: 1px solid var(--line); padding: 12px 16px 16px; overflow: visible; }
  .lm-panel h1 { font-size: 20px; }
  .lm-app { display: none; }
  .lm-map-wrap { order: 2; min-height: 62dvh; }
  .lm-legend { inset-inline-end: 14px; border-radius: 16px; }
}

/* "hidden" always hides (several elements here set their own display). */
.lm [hidden] { display: none !important; }
