/* Grundlayout */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Libre Baskerville', 'Georgia', serif;
  background: #004454;
  color: #fff;
}

/* Seitenleiste */
#seitenleiste {
  position: fixed;
  top: 0; left: 0;
  width: 260px;
  height: 100%;
  background: #004454;
  border-right: 1px solid rgba(255,255,255,0.15);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
}

#kopf {
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

#wiki-link {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
#wiki-link:hover { color: #fff; }

#kopf h1 {
  font-size: 17px;
  font-weight: normal;
  color: #fff;
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* Suche */
#suche-container {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

#suche {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 3px;
  background: rgba(255,255,255,0.1);
  font-family: inherit;
  font-size: 13px;
  color: #fff;
  outline: none;
}
#suche::placeholder { color: rgba(255,255,255,0.4); }
#suche:focus { border-color: rgba(255,255,255,0.6); }

/* WMS-Ebenen */
#wms-ebenen {
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

#wms-ebenen legend {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}

.wms-zeile {
  margin-bottom: 6px;
}

.wms-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  color: #fff;
}
.wms-label:hover { color: rgba(255,255,255,0.75); }

.wms-label input[type="checkbox"] {
  width: 14px; height: 14px;
  cursor: pointer;
  accent-color: #008054;
}

.wms-slider-zeile {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding-left: 22px;
}

.wms-slider-zeile.versteckt { display: none; }

.wms-slider-zeile input[type="range"] {
  flex: 1;
  height: 3px;
  cursor: pointer;
  accent-color: #008054;
}

.wms-zeit-zeile {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding-left: 22px;
}

.wms-zeit-zeile.versteckt { display: none; }

.wms-zeit-zeile input[type="range"] {
  flex: 1;
  height: 3px;
  cursor: pointer;
  accent-color: #008054;
}

.wms-zeit-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 2px;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  padding: 1px 5px;
  cursor: pointer;
  flex-shrink: 0;
}
.wms-zeit-btn:hover {
  background: rgba(255,255,255,0.1);
}

.wms-zeit-wert {
  font-size: 11px;
  color: #fff;
  font-weight: bold;
  min-width: 32px;
  text-align: right;
  flex-shrink: 0;
}

.wms-opacity-wert {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  min-width: 30px;
  text-align: right;
}

/* Treffer-Info */
#treffer-info {
  padding: 10px 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.15);
}

/* Karte */
#karte {
  position: fixed;
  top: 0;
  left: 260px;
  right: 0;
  bottom: 0;
  z-index: 1;
}

/* Leaflet-Anpassungen */
.leaflet-container {
  font-family: 'Libre Baskerville', 'Georgia', serif;
  background: #fff;
}

.leaflet-popup-content-wrapper {
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  background: #004454;
}
.leaflet-popup-tip { background: #004454; }

.leaflet-popup-content {
  margin: 12px 14px;
  min-width: 160px;
}

.popup-titel {
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 4px;
}
.popup-titel a {
  color: #fff;
  text-decoration: none;
}
.popup-titel a:hover { text-decoration: underline; }

.popup-kategorie {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.popup-beschreibung {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}

/* Mobil */
@media (max-width: 640px) {
  #seitenleiste {
    width: 100%;
    height: auto;
    max-height: 45%;
    position: fixed;
    bottom: 0;
    top: auto;
    border-right: none;
    border-top: 2px solid rgba(255,255,255,0.2);
    flex-direction: column-reverse;
  }
  #karte {
    left: 0;
    bottom: 45%;
    top: 0;
  }
  #treffer-info { border-top: none; border-bottom: 1px solid rgba(255,255,255,0.15); }
}
