/* Routenplanung (plan.html). styles.css bleibt unangetastet. */

/* MapLibre-Popups dunkel (maplibre-gl.css laedt NACH dieser Datei -> !important,
   sonst weisser Default-Hintergrund). */
.maplibregl-popup .maplibregl-popup-content {
  background: #15171c !important; color: #e7e9ee !important;
  border: 1px solid var(--border); border-radius: var(--radius); font: inherit;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: #15171c !important; }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: #15171c !important; }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: #15171c !important; }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: #15171c !important; }
.maplibregl-popup .maplibregl-popup-content a { color: #6db3ff; }
.maplibregl-popup .maplibregl-popup-content .muted { color: #9aa0aa !important; }
.maplibregl-popup-close-button { color: #e7e9ee !important; }

/* Notiz-Textarea im Speichern-Dialog (gleicher Look wie Admin-/Werber-Portal). */
.msg-body {
  width: 100%; min-height: 100px; box-sizing: border-box; resize: vertical;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); padding: 10px; font: inherit;
}

html, body { height: 100%; }
.app-full { position: relative; height: calc(100vh - 56px); }
#map { position: absolute; inset: 0; }

.planbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.planbar select {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); padding: 7px 8px;
}

/* Kompakte Info-Box (wie App): kleine Pille oben links, nimmt wenig Platz. */
.map-overlay {
  position: absolute; top: 10px; left: 10px; z-index: 5; max-width: 260px;
  background: var(--card2, var(--card)); border: 1px solid var(--border);
  border-radius: 10px; padding: 5px 10px; color: var(--text); font-size: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.map-overlay .big { font-size: 15px; font-weight: 700; color: var(--primary); }
.map-overlay .muted { color: var(--muted); font-size: 11px; }
.map-overlay .hint { color: var(--muted); font-size: 11px; margin-top: 2px; line-height: 1.3; }

/* Icon-Buttons (Topbar + Undo/Redo): quadratisch, kompakt. */
.icon-btn { padding: 6px 8px; min-width: 32px; line-height: 1; }
.who-icon { font-size: 16px; cursor: default; }

/* Konsolidiertes Plan-Menue (Dropdown unter der Topbar, rechts). */
.plan-menu {
  position: absolute; top: 8px; right: 10px; z-index: 20; width: 230px;
  max-height: calc(100% - 16px); overflow-y: auto;
  background: var(--card2, var(--card)); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px; box-shadow: 0 6px 22px rgba(0,0,0,.55);
}
.menu-group { padding: 4px 2px 8px; }
.menu-group + .menu-group { border-top: 1px solid var(--border); }
.menu-h { font-size: 11px; color: var(--primary); text-transform: uppercase; letter-spacing: .04em; margin: 2px 0 6px; }
.menu-cb { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 2px; cursor: pointer; }
.menu-cb input { accent-color: var(--primary); }
.menu-item { display: block; width: 100%; text-align: left; margin: 3px 0; }
.menu-row { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.menu-row .sec-prof { flex: 1; }

.sidebar {
  position: absolute; top: 12px; right: 12px; bottom: 12px; width: 300px; z-index: 6;
  background: var(--card2, var(--card)); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; overflow-y: auto; color: var(--text);
}
.sidebar h3 { margin: 0 0 8px; font-size: 13px; color: var(--primary); text-transform: uppercase; letter-spacing: .04em; }
.route-item {
  padding: 8px; border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 8px; cursor: pointer;
}
.route-item:hover { border-color: var(--primary); }
.route-item .title { font-weight: 600; }
.route-item .meta { font-size: 12px; color: var(--muted); }

/* Wegpunkt-Marker 1:1 wie die App (MapLibreRouteMap): farbige Punkte ohne
   Nummer. Dazwischen rot (#D32F2F), Start gruen (#2E7D32), Ziel dunkel
   (#212121), weisser Rand. */
.wp {
  width: 18px; height: 18px; border-radius: 50%; cursor: grab;
  background: #D32F2F; border: 2.5px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.wp.start { width: 20px; height: 20px; background: #2E7D32; border-width: 3px; }
.wp.end { width: 20px; height: 20px; background: #212121; border-width: 3px; }
/* Rundtour-Startpunkt (gruen wie Start). */
.rt-start { width: 20px; height: 20px; border-radius: 50%; background: #2E7D32; border: 3px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.6); }
/* Via-Punkt der Rundtour (Zwischenstopp): kleiner blauer Punkt. */
.via-pt { width: 15px; height: 15px; border-radius: 50%; background: #1565C0; border: 2.5px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.6); cursor: grab; }
/* Abschnitts-Anker (Start A gruen, Ende B amber) fuer die Abschnitts-Optimierung. */
.section-pin { width: 18px; height: 18px; border-radius: 4px; border: 2.5px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.section-pin.a { background: #2E7D32; }
.section-pin.b { background: #F9A825; }
/* Abschnitts-Profil-Auswahl in der Planbar. */
.sec-tag { color: var(--muted); font-size: 12px; }
.planbar .sec-prof { padding: 6px 8px; }

.login-wrap-full { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

.login-card { min-width: 280px; }
.login-card input {
  width: 100%; box-sizing: border-box; padding: 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text);
}
.form-row { margin-bottom: 10px; }

/* Routing-Options-Toggles in der Topbar */
.planbar label.chk {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.planbar label.chk input { accent-color: var(--primary); }

/* Marke als Home-Link, aber wie Text aussehen (nicht wie ein Link). */
a.brand { color: var(--text); text-decoration: none; }
a.brand:hover { opacity: .85; }

/* POI-Pins entlang der Route (Glyph + Kategorie-Farbe, wie die App) */
.poi-pin {
  width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.5); cursor: pointer;
}
.poi-pin.sponsored { border-color: #FFD54F; }
.poi-pop-title { font-weight: 700; }
.poi-pop-ad { display: inline-block; font-size: 11px; color: #fff; background: #EF6C00; border-radius: 4px; padding: 0 5px; margin: 2px 0; }
.poi-pop a { display: inline-block; margin-top: 4px; }

/* POI-Kategorie-Menü */
.poi-menu {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 7;
  background: var(--card2, var(--card)); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow-y: auto;
}
.poi-menu-h { font-size: 12px; color: var(--primary); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.poi-menu-item { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); cursor: pointer; white-space: nowrap; }
.poi-menu-item input { accent-color: var(--primary); }

/* Höhenprofil-Panel (interaktiv) */
.elev-panel {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 6;
  background: var(--card2, var(--card)); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 10px;
}
.elev-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text); margin-bottom: 4px; }
.elev-canvas { position: relative; height: 120px; }

/* Wetter-Warnungen */
.wx-panel {
  position: absolute; top: 12px; right: 12px; z-index: 6; width: 240px; max-height: 60vh; overflow-y: auto;
  background: var(--card2, var(--card)); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; color: var(--text); font-size: 13px;
}
/* Verkehrs-Panel links neben dem Wetter-Panel, damit beide gleichzeitig
   sichtbar sind (statt uebereinander am gleichen Anker). */
#trPanel { right: 264px; }
.wx-h { font-size: 12px; color: var(--primary); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.wx-row { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.wx-ico { font-size: 15px; }
.wx-pin {
  width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.5); cursor: pointer;
}
