@font-face { font-family: "Barlow SC"; font-weight: 500; font-display: swap; src: url("vendor/fonts/barlow-semi-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow SC"; font-weight: 600; font-display: swap; src: url("vendor/fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow SC"; font-weight: 700; font-display: swap; src: url("vendor/fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }

/* Erfurt: Rot und Weiß. Rot nur für Marke und Hauptaktion, Kartenpunkte behalten ihre eigenen Farben. */
:root {
  --red: #b81f2d;
  --red-deep: #8f1823;
  --on-red: #ffffff;
  --ink: #262626;
  --ink-soft: #5e5e5e;
  --paper: #ffffff;
  --mist: #ececec;
  --line: #d9d9d9;
  --free: #0e9f6e;
  --paid: #e0661b;
  --unknown: #8c96a5;
  --tiles: saturate(.3) brightness(1.04) contrast(.94);
  --lift: 0 1px 0 rgba(0, 0, 0, .06), 0 6px 18px rgba(0, 0, 0, .14);
  --r: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --red: #c4303d; --red-deep: #9b1d29;
    --ink: #ececec; --ink-soft: #a8a8a8; --paper: #1d1e20; --mist: #2a2b2e; --line: #3b3c40;
    --tiles: invert(1) hue-rotate(180deg) saturate(.25) brightness(.85) contrast(.9);
    --lift: 0 1px 0 rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 500 16px/1.35 "Barlow SC", system-ui, sans-serif; color: var(--ink); background: var(--mist); }
#map { position: fixed; inset: 0; background: var(--mist); }
.leaflet-tile-pane { filter: var(--tiles); }
.leaflet-container { font: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ---------- Panel: roter Kopf mit Marke, weißer Körper mit Filtern ---------- */
.panel {
  position: fixed; z-index: 1000; top: 16px; left: 16px; width: 296px;
  background: var(--paper); border-radius: var(--r); box-shadow: var(--lift); overflow: hidden;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  background: var(--red); color: var(--on-red); padding: 14px 16px 14px 14px;
}
.brand .logo { flex: none; width: 46px; height: 46px; display: block; border-radius: 8px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.brand h1 { margin: 0; font-size: 30px; font-weight: 700; line-height: .95; letter-spacing: -.01em; }
.brand p { margin: 3px 0 0; font-size: 15px; opacity: .92; }

.filters { display: grid; margin: 0; padding: 6px 0; border: 0; }
.chip {
  display: flex; align-items: center; gap: 12px; width: 100%;
  font: inherit; font-size: 16px; color: var(--ink); text-align: left;
  background: none; border: 0; border-left: 4px solid var(--c);
  padding: 9px 16px 9px 12px; cursor: pointer;
}
.chip + .chip { border-top: 1px solid var(--line); }
.chip .swatch { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.chip .short { display: none; }
.chip .count { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.chip:hover { background: var(--mist); }
.chip[aria-pressed="false"] { border-left-color: var(--line); color: var(--ink-soft); }
.chip[aria-pressed="false"] .swatch { background: none; box-shadow: inset 0 0 0 2px var(--line); }
.chip[aria-pressed="false"] .label { text-decoration: line-through; text-decoration-thickness: 1px; }

.meta { font-size: 13px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 8px 16px 12px; border-top: 1px solid var(--line); }
.meta a { color: inherit; }
.notice { margin: 0 16px 12px; padding: 10px 12px; border-radius: var(--r); background: var(--mist); font-size: 15px; display: none; }

/* ---------- Kartensteuerung ---------- */
.leaflet-bar { border: 0 !important; box-shadow: var(--lift) !important; border-radius: var(--r) !important; overflow: hidden; }
.leaflet-bar a, .leaflet-bar button {
  width: 40px !important; height: 40px !important; line-height: 40px !important;
  background: var(--paper) !important; color: var(--ink) !important; border-color: var(--line) !important;
}
.leaflet-bar a.leaflet-disabled { color: var(--line) !important; }
.locate { display: grid; place-items: center; border: 0; cursor: pointer; padding: 0; }
.locate svg { width: 20px; height: 20px; }
.locate[data-state="busy"] svg { opacity: .4; }
.leaflet-control-attribution { background: color-mix(in srgb, var(--paper) 85%, transparent) !important; color: var(--ink-soft) !important; font-size: 11px; }
.leaflet-control-attribution a { color: inherit !important; }

/* ---------- Detailkarte ---------- */
.sheet {
  position: fixed; z-index: 1001; right: 16px; top: 16px; width: 320px;
  max-height: calc(100vh - 150px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); color: var(--ink); border-radius: var(--r); box-shadow: var(--lift);
  padding: 16px;
}
.sheet[hidden] { display: none; }
.sheet-close {
  position: absolute; z-index: 2; top: 8px; right: 8px; width: 34px; height: 34px;
  border: 0; border-radius: var(--r); background: var(--paper); box-shadow: var(--lift);
  color: var(--ink); font: inherit; font-size: 22px; line-height: 1; cursor: pointer;
}
.sheet-close:hover { background: var(--mist); }

/* Farbbalken oben zeigt den Gebührenstatus */
.pop { border-top: 5px solid var(--c); margin: -16px -16px 0; padding: 14px 16px 0; }
.pop .photo { position: relative; margin: -14px -16px 14px; }
.pop .photo img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--mist); }
.pop .photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 10px 6px;
  font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .65));
}
.pop .photo figcaption a { color: #fff; }
.pop .status { font-weight: 600; font-size: 14px; color: var(--c); }
.pop h2 { margin: 2px 0 0; padding-right: 30px; font-size: 22px; font-weight: 700; line-height: 1.12; }
.pop .where { margin: 3px 0 0; font-weight: 600; }
.pop .kind { margin: 1px 0 0; color: var(--ink-soft); }
.pop .prices { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.pop .prices li { padding: 7px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pop .prices li:first-child { font-weight: 700; font-size: 18px; }
.pop .note { margin: 8px 0 0; font-size: 14px; color: var(--ink-soft); }
.pop dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 12px 0 0; font-size: 15px; }
.pop dt { color: var(--ink-soft); }
.pop dd { margin: 0; }
.pop .src { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); }
.pop .src a { color: inherit; }
.pop .actions {
  position: sticky; bottom: -16px; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin: 14px -16px -16px; padding: 10px 16px 16px; background: var(--paper);
}
.pop .actions a {
  display: block; text-align: center; text-decoration: none; font-weight: 600; white-space: nowrap;
  padding: 10px 8px; border-radius: var(--r); border: 1px solid var(--line); color: var(--ink);
}
.pop .actions a:hover { border-color: var(--ink-soft); }
.pop .actions a.primary { background: var(--red); border-color: var(--red); color: var(--on-red); }
.pop .actions a.primary:hover { background: var(--red-deep); border-color: var(--red-deep); }

/* ---------- Hover-Vorschau ---------- */
.leaflet-tooltip.pk-tip {
  background: var(--paper); color: var(--ink); border: 0; border-left: 4px solid var(--c);
  border-radius: var(--r); box-shadow: var(--lift); padding: 7px 12px 8px 10px;
  font: inherit; font-size: 14px; white-space: nowrap; pointer-events: none;
}
.leaflet-tooltip-top.pk-tip::before { border-top-color: var(--paper); }
.pk-tip div { display: grid; gap: 1px; }
.pk-tip strong { font-size: 15px; }
.pk-tip .tip-price { color: var(--c); font-weight: 600; }
.pk-tip .tip-where { color: var(--ink-soft); }
.pk-tip .tip-hint { color: var(--ink-soft); font-size: 12px; margin-top: 3px; }


/* ---------- Zielsuche ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search { position: relative; display: flex; margin: 12px 12px 4px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.search:focus-within { border-color: var(--red); box-shadow: 0 0 0 2px color-mix(in srgb, var(--red) 25%, transparent); }
.search input {
  flex: 1; min-width: 0; border: 0; background: none; color: var(--ink);
  font: inherit; font-size: 16px; padding: 10px 12px; outline: none;
}
.search input::placeholder { color: var(--ink-soft); }
.search input::-webkit-search-cancel-button { display: none; }
.search button { border: 0; background: none; color: var(--ink-soft); padding: 0 12px; cursor: pointer; display: grid; place-items: center; }
.search button:hover { color: var(--red); }
.search.busy button { opacity: .4; }
#suggest {
  position: absolute; z-index: 5; left: -1px; right: -1px; top: calc(100% + 4px);
  list-style: none; margin: 0; padding: 4px 0; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--lift);
  max-height: 300px; overflow-y: auto;
}
#suggest .opt { display: grid; padding: 7px 12px; cursor: pointer; }
#suggest .opt.active, #suggest .opt:hover { background: var(--mist); }
#suggest .opt-label { font-weight: 600; }
#suggest .opt-sub { font-size: 13px; color: var(--ink-soft); }
#suggest .opt-address .opt-label { color: var(--red); }

.results { margin: 6px 12px 8px; }
.results-head { display: flex; align-items: flex-start; gap: 8px; }
.results-head p { flex: 1; margin: 4px 0 6px; font-size: 14px; color: var(--ink-soft); }
.results-head button { border: 0; background: none; color: var(--ink-soft); font: inherit; font-size: 20px; line-height: 1; padding: 2px 4px; cursor: pointer; }
.panel { max-height: calc(100vh - 32px); overflow-y: auto; }
.results ol { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow-y: auto; }
.result {
  display: grid; width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink); background: none;
  border: 0; border-left: 4px solid var(--c); border-bottom: 1px solid var(--line);
  padding: 7px 4px 7px 10px;
}
.result:hover { background: var(--mist); }
.result .r-name { font-weight: 600; }
.result .r-price { font-size: 14px; color: var(--c); font-weight: 600; }
.result .r-dist { font-size: 13px; color: var(--ink-soft); }

.dest-pin span {
  display: block; width: 26px; height: 26px; background: var(--red);
  border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

/* ---------- Parkscheibe ---------- */
.disc-box {
  display: grid; margin: 12px 0 0; padding: 8px 10px;
  border-left: 4px solid #2563c9; background: color-mix(in srgb, #2563c9 10%, var(--paper));
}
.disc-box strong { color: #2563c9; }
.disc-box .disc-hint { font-size: 13px; color: var(--ink-soft); }
@media (prefers-color-scheme: dark) { .disc-box strong { color: #8fb3f5; } }
.pk-tip .tip-disc { color: #2563c9; font-weight: 600; }
@media (prefers-color-scheme: dark) { .pk-tip .tip-disc { color: #8fb3f5; } }
.disc-legend[hidden] { display: none; }
.disc-legend { display: inline-flex; align-items: center; gap: 5px; }
.disc-legend i { width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 3.5px solid var(--ink-soft); }

/* ---------- Handy ---------- */
@media (max-width: 640px) {
  .panel { top: 8px; left: 8px; right: 8px; width: auto; }
  .brand { padding: 10px 12px 10px 10px; gap: 10px; }
  .brand .logo { width: 38px; height: 38px; }
  .brand h1 { font-size: 25px; }
  .brand p { font-size: 14px; }
  .filters { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; }
  .chip { min-width: 0; padding: 9px 8px 9px 8px; font-size: 15px; gap: 6px; }
  .chip + .chip { border-top: 0; }
  .chip .long { display: none; }
  .chip .short { display: inline; }
  .chip .count { margin-left: 2px; }
  .meta { padding: 7px 12px 9px; }
  .sheet { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: min(70vh, 580px); }
  .results.collapsed ol { display: none; }
  .results.collapsed .results-head p { cursor: pointer; text-decoration: underline; }
  .search { margin: 8px 8px 2px; }
  .results { margin: 4px 8px 6px; }
  .results ol { max-height: 30vh; }
  .pop .photo img { aspect-ratio: 16 / 8; }
}

/* ---------- Rechtstexte ---------- */
body.legal { background: var(--mist); }
.legal main { max-width: 42rem; margin: 0 auto; padding: 0 16px 64px; }
.legal .back {
  display: flex; align-items: center; gap: 12px; margin: 0 0 24px; padding: 12px 16px;
  background: var(--red); color: var(--on-red); text-decoration: none; font-weight: 600;
}
.legal .back img { width: 36px; height: 36px; border-radius: 6px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
@media (min-width: 700px) { .legal .back { border-radius: 0 0 var(--r) var(--r); } }
.legal article { background: var(--paper); border-radius: var(--r); box-shadow: var(--lift); padding: 28px 28px 20px; }
.legal h1 { font-size: 36px; line-height: 1.1; margin: 0 0 20px; }
.legal h2 { font-size: 22px; margin: 28px 0 6px; }
.legal p, .legal li { font-size: 17px; line-height: 1.5; }
.legal p { margin: 0 0 12px; }
.legal address { font-style: normal; font-size: 17px; line-height: 1.5; margin-bottom: 12px; }
.legal article a { color: var(--red); }
@media (prefers-color-scheme: dark) { .legal article a { color: #f0a1a8; } }
.legal .stand { color: var(--ink-soft); font-size: 15px; margin-top: 24px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
