/* Vollbild für Karte */
html, body {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
}

/* Hinweisbanner: Beispieldaten */
#demo-banner {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 100%;
  padding: 6px 12px;
  background: #fff3cd;
  color: #664d03;
  font-size: 0.85em;
  text-align: center;
  border-bottom: 1px solid #ffe69c;
}

/* Sidebar (Filter) + Karte nebeneinander */
#app-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  position: relative;
}

#mapid {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
}

h3 {
  margin-top: 0px;
}

/* Popup-Tabelle */
table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  text-align: left;
  padding: 4px;
  height: fit-content;
  vertical-align: top;
}

tr:nth-child(even) {
  background-color: white;
}

/* Filter-Panel: Kopfzeile bleibt fix, nur der Inhalt scrollt/klappt ein.
   Standard (mobil): schwebt als Box ueber der Karte. */
.filter-panel {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  min-width: 180px;
  max-width: calc(100% - 20px);
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.4);
  overflow: hidden;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
}

.filter-toggle {
  border: none;
  background: none;
  font-size: 1.3em;
  line-height: 1;
  padding: 4px 8px;
  color: #3250c8;
  cursor: pointer;
}

.filter-body {
  padding: 0 12px 8px;
  max-height: 420px;
  overflow-y: auto;
}

.filter-panel.collapsed .filter-body {
  display: none;
}

/* Eingeklappt (mobil): nur eine kleine, runde Pfeil-Bubble statt der
   vollen Kopfzeile mit Text */
.filter-panel.collapsed {
  min-width: 0;
  border-radius: 50%;
}

.filter-panel.collapsed .filter-header {
  padding: 0;
  justify-content: center;
}

.filter-panel.collapsed .filter-header-titel {
  display: none;
}

.filter-panel.collapsed .filter-toggle {
  width: 44px;
  height: 44px;
  font-size: 1.5em;
  padding: 0;
}

/* Desktop: Sidebar wird Teil des Layouts (volle Hoehe, links), statt ueber
   der Karte zu schweben. Zoom-Steuerung sitzt dafuer rechts (siehe karte.js). */
@media (min-width: 601px) {
  .filter-panel {
    position: static;
    height: 100%;
    flex: 0 0 300px;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    transition: flex-basis 0.15s ease;
  }

  .filter-body {
    flex: 1 1 auto;
    max-height: none;
  }

  .filter-panel.collapsed {
    flex-basis: 44px;
    border-radius: 0;
  }

  .filter-panel.collapsed .filter-header {
    height: 100%;
    flex-direction: column;
    padding: 12px 0;
  }
}

/* Firmenlogos im Popup */
.clogo {
  width: 180px;
  height: auto;
}

/* Öffnungszeiten-Aufklappelement */
details summary {
  user-select: none;
}
