/* Gemeinsame Grundgestaltung für Verwaltung und Tablet. */

:root {
  color-scheme: light;
  --hintergrund: #faf7f2;
  --flaeche: #ffffff;
  --rand: #ebe3d5;
  --text: #23282f;
  --text-schwach: #6f6a61;
  --akzent: #1a6feb;
  --akzent-text: #ffffff;
  --warnung: #b54708;
  --warnung-flaeche: #fff3e4;
  --gefahr: #c0242f;
  --ok: #1a7f37;
  --radius: 20px;
  --schatten: 0 1px 2px rgba(35,28,15,.04), 0 12px 28px -18px rgba(35,28,15,.16);
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
}

* { box-sizing: border-box; }
[v-cloak] { display: none; }

body {
  margin: 0;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--hintergrund);
  color: var(--text);
}

h1, h2, h3, h4 { line-height: 1.25; font-family: var(--font-display); }

button {
  font: inherit;
  border: 1px solid var(--rand);
  background: var(--flaeche);
  color: var(--text);
  border-radius: var(--radius);
  padding: .55rem 1rem;
  cursor: pointer;
}
button:hover { border-color: var(--akzent); }
button:disabled { opacity: .45; cursor: default; }
button.primaer { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
button.gefahr { color: var(--gefahr); }
button.klein { padding: .3rem .65rem; font-size: .88rem; }

a.primaer {
  display: inline-block;
  font: inherit;
  border: 1px solid var(--akzent);
  background: var(--akzent);
  color: var(--akzent-text);
  border-radius: var(--radius);
  padding: .55rem 1rem;
  cursor: pointer;
}

input, select, textarea {
  font: inherit;
  color: var(--text);
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: .5rem .7rem;
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: -1px; }
label { display: block; font-size: .85rem; color: var(--text-schwach); margin: .7rem 0 .25rem; }

.karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--schatten);
}

.hinweis-warnung {
  background: var(--warnung-flaeche);
  color: var(--warnung);
  border-radius: var(--radius);
  padding: .6rem .9rem;
  font-size: .92rem;
}

.meldung {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--hintergrund);
  padding: .6rem 1.1rem;
  border-radius: 999px;
  font-size: .95rem;
  z-index: 3000;
  max-width: min(92vw, 34rem);
  text-align: center;
}
.meldung.fehler { background: var(--gefahr); color: #fff; }

.modal-grund {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: grid;
  place-items: center;
  z-index: 2000;
  padding: 1rem;
}
.modal {
  background: var(--flaeche);
  border-radius: var(--radius);
  width: min(60rem, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 1.2rem 1.4rem;
}

/* Status-Kennzeichen (Text, Audio, Auslöser …) */
.chip {
  display: inline-flex; align-items: center; gap: .3em;
  font-size: .76rem; font-weight: 600; line-height: 1.2;
  padding: .28em .65em; border-radius: 999px;
  background: var(--hintergrund); color: var(--text-schwach);
  white-space: nowrap;
}
.chip.ok { background: #e9f5ec; color: var(--ok); }
.chip.warnung { background: var(--warnung-flaeche); color: var(--warnung); }
.chip.fehlt { background: #fdecee; color: var(--gefahr); }
.chip.info { background: #eaf2ff; color: var(--akzent); }

.fortschrittsbalken { height: 7px; border-radius: 4px; background: var(--rand); overflow: hidden; }
.fortschrittsbalken > div { height: 100%; background: var(--ok); transition: width .3s ease; }

.klein-text { font-size: .85rem; color: var(--text-schwach); }
.leaflet-container.zeichnet { cursor: crosshair; }

/* Nummerierte Stationsmarker auf allen Karten */
.stations-marker {
  width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; background: var(--akzent); color: #fff;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45);
  display: grid; place-items: center;
  font: 700 .72rem/1 system-ui, sans-serif; cursor: pointer;
}
.stations-marker.gedaempft { background: #8a8578; }
.stations-marker.land { background: var(--warnung); }
.stations-marker.aktiv { width: 32px; height: 32px; margin: -16px 0 0 -16px; background: var(--ok); font-size: .8rem; }

/* Marker als reines CSS — Leaflet braucht so keine Bild-Assets. */
.punkt-marker {
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--akzent);
  border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.punkt-marker.startpunkt { background: var(--ok); }
.position-marker {
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: #d1242f;
  border: 3px solid #fff;
  box-shadow: 0 0 0 4px rgba(209,36,47,.25);
}

/*
 * Onboarding-Spotlight: vier abdunkelnde Streifen rund um das Ziel-Element
 * (siehe onboarding-engine.js streifenRects()) statt eines clip-path-Cutouts
 * — das Ziel selbst wird von keinem Streifen überdeckt und bleibt dadurch
 * nativ klickbar, ohne Pointer-Events-Tricks. z-index oberhalb .meldung
 * (3000), da beide gleichzeitig sichtbar sein können.
 */
.onboarding-streifen {
  position: fixed;
  background: rgba(10,14,20,.6);
  z-index: 4000;
  transition: top .2s, left .2s, width .2s, height .2s;
}
.onboarding-hervorhebung {
  outline: 3px solid var(--akzent);
  outline-offset: 3px;
  border-radius: var(--radius);
}
.onboarding-karte {
  position: fixed;
  z-index: 4001;
  background: var(--flaeche);
  border-radius: var(--radius);
  box-shadow: var(--schatten), 0 4px 16px rgba(0,0,0,.18);
  padding: 1rem 1.2rem;
  width: min(22rem, calc(100vw - 2rem));
}
.onboarding-karte h4 { margin: 0 0 .4rem; font-size: 1.05rem; }
.onboarding-karte p { margin: 0 0 .9rem; color: var(--text-schwach); font-size: .92rem; }
.onboarding-karte .zeile { display: flex; align-items: center; gap: .5rem; justify-content: space-between; }
.onboarding-karte .warte-hinweis { font-size: .88rem; color: var(--akzent); font-style: italic; }
.onboarding-karte .schritt-zaehler { font-size: .78rem; color: var(--text-schwach); margin-top: .7rem; text-align: right; }

@media (prefers-reduced-motion: reduce) {
  .onboarding-streifen { transition: none; }
}
