:root {
    --primary-color: #5c739e;
    --secondary-color: #ffffff;
    --bg-color: #f5f5f5;
    --toggle-bg: rgba(255, 255, 255, 0.9);
    --toggle-hover-bg: rgba(255, 255, 255, 1);
    --toggle-color: #333;
    --footer-bg: rgba(255, 255, 255, 0.9);
    --footer-text: #333;
  }
  
  html, body {
    height: 100%;
    margin: 0;
  }
  body{
  background:#f1f5f7 !important;
  font-family: "SSequel", Helvetiva, sans-serif !important;
  font-size: 14px !important;
}
  
  #map {
    height: 100%;
  }
  .form-floating>.form-control, .form-floating>.form-select {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
    margin: 10px !important;
}
  
  /* Toggle Button (Desktop: links, Mobile: oben rechts) */
  #toggleSidebar {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 1100;
    background: var(--toggle-bg);
    border: none;
    border-radius: 0%;
    width: 45px;
    height: 45px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,1);
    transition: background 0.3s ease;
  }
  
  #toggleSidebar:hover {
    background: var(--toggle-hover-bg);
  }
  
  #toggleSidebar i {
    color: var(--toggle-color);
    font-size: 20px;
  }
  
  /* Desktop-Ansicht: Sidebar links, wie Standard */
  .leaflet-sidebar {
    transition: transform 0.3s ease;
  }
  
  .accordion-button:not(.collapsed) {
    color: white;
    background-color: #5c739e;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .125);
}

  /* Mobile-Ansicht: Sidebar als Top-Panel */
  @media (max-width: 768px) {
    /* Toggle Button oben rechts */
    img.logo {
      max-width: 100% !important;
      height: 3rem !important;
      width: auto !important;
      margin-top: 0.5rem;
    }
    #toggleSidebar {
      display: flex;
      left: auto;
      right: 5px;
      top: 5px;
    }
    /* Sidebar als horizontales Panel am oberen Rand */
    .leaflet-sidebar {
      position: absolute;
      top: 0;
      left: 0;
      width: 100% !important;
      height: auto !important;
      max-height: 60vh;
      /* Anfangszustand: ausgeblendet nach oben */
      transform: translateY(-100%);
      z-index: 1300; /* über dem Footer */
    }
    /* Wird die Sidebar geöffnet (Klasse 'collapsed' entfernen), so gleitet sie runter */
    .leaflet-sidebar:not(.collapsed) {
      transform: translateY(0);
    }
    /* Tabs als horizontale Navigation */
    .leaflet-sidebar-tabs {
      display: flex;
      flex-direction: row;
      justify-content: center;
      /* background: var(--primary-color); */
    }
    .leaflet-sidebar-tabs ul {
      display: flex;
      flex-direction: row;
      margin: 0;
      padding: 0;
    }
    .leaflet-sidebar-tabs ul li a {
      color: var(--secondary-color);
      font-size: 18px;
      transition: background 0.3s ease;
    }
    .leaflet-sidebar-tabs ul li a:hover,
    .leaflet-sidebar-tabs ul li a.active {
      background: rgba(255, 255, 255, 0.2);
    }
    /* Sidebar-Inhalt: scrollbarer Bereich mit zusätzlichem Padding für den Footer */
    .leaflet-sidebar-content {
      background: #fff;
      overflow-y: auto;
       /*max-height: calc(50vh - 50px); 50px für die Tab-Leiste */
      padding-bottom: 60px;
    }
    /* Sidebar-Header anpassen */
    .leaflet-sidebar-header {
      background: var(--primary-color);
      color: var(--secondary-color);
      padding: 15px;
      margin: 0;
    }
  }
  
  /* Desktop Sidebar Styling (Seitenleiste links) */
  .leaflet-sidebar .leaflet-sidebar-tabs ul {
    background: var(--primary-color);
  }
  .leaflet-sidebar .leaflet-sidebar-tabs ul li a {
    color: var(--secondary-color);
    font-size: 18px;
    transition: background 0.3s ease;
  }
  .leaflet-sidebar .leaflet-sidebar-tabs ul li a:hover,
  .leaflet-sidebar .leaflet-sidebar-tabs ul li a.active {
    background: rgba(255, 255, 255, 0.2);
  }
  .leaflet-sidebar .leaflet-sidebar-header {
    background: var(--primary-color);
    color: var(--secondary-color);
    margin: -10px -20px 0;
    height: 40px;
    padding: 0 20px;
    line-height: 40px;
    font-size: 14.4pt;
  }
  .leaflet-sidebar .leaflet-sidebar-content {
    background: #fff;
    overflow-y: auto;
  }
 
  
  /* Moderner Close-Button */
  .leaflet-sidebar-close {
    cursor: pointer;
    font-size: 18px;
    opacity: 0.8;
    transition: opacity 0.3s;
  }
  .leaflet-sidebar-close:hover {
    opacity: 1;
  }

  .footer {
    border-radius: 3px;
    border: 0px solid;
    margin-top: 25px;
  }
  
  .card-footer {
    padding: 0.75rem 0 !important;
    background-color: rgba(255,255,255,.03)!important;
    border-top: 0 !important;
    margin-top: 10px;
  }

  .legende_rahmen {
    border: 1px solid #e4e4e4;
    padding: 15px 20px;
    margin-top: 10px;
	}
.legende_rahmen {
    box-shadow: none;
}
.legende_rahmen .legend-item {
  margin-bottom: 4px;
  display: flex;
  align-items: center;
}

i {
    width: 18px;
    height: 18px;
    float: left;
    margin: 0 4px 0 0;
    opacity: 1;
}
  

.leaflet-sidebar-tabs > li.active, .leaflet-sidebar-tabs > ul > li.active {
  color: #fff;
  background-color: var(--primary-color);
}


.btn-primary{
  
  color: #fff!important;
  background: var(--primary-color);
    border-width: 2px!important;
  border-radius: 0!important;
border-color: var(--primary-color);
margin-bottom:0.5em;
}

.btn-primary:hover{
  
  color: black!important;
  background: #fff!important;
    border-width: 2px!important;
  border-radius: 0!important;
border-color: var(--primary-color);
margin-bottom:0.5em;

}

.btn.dropdown-toggle.btn-light{
	border-color: var(--primary-color);
	 border-style:solid!important;
	 border-width: 2px;
   color: black !important;
	background:white!important;
    box-shadow: none;
	border-radius: 0px;
    transition: all .3s ease;
}

.fa.fa-home {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 40px;
  color: inherit;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}

.fa {
  display: inline-block;
  font-family: FontAwesome;
  font-style: normal;
  font-weight: normal;
  line-height: 2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img.logo {
  max-width: 100% ;
  height: 5rem;
  width: auto;
  margin-top: 0.5rem;
}

.leaflet-container a {
  color: black;
}

.footer {
  border-radius: 3px;
  border: 0px solid;
  margin-top: 25px;
}

.card-footer {
  padding: 0.75rem 0 !important;
  background-color: rgba(255,255,255,.03)!important;
  border-top: 0 !important;
  margin-top: 10px;
}