body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0b1020;
  color: white;
}

#app {
  height: 100vh;
}

#map {
  position: relative;
  height: 100vh;
  width: 100%;
}

/* Titel oben mittig */
#map-title {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);

  padding: 12px 24px;
  background: rgba(10, 20, 40, 0.75);
  backdrop-filter: blur(8px);
  color: #f2c94c;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);

  font-size: 18px;
  font-weight: bold;
  border-radius: 14px;

  z-index: 1000;
}

#map-title:hover {
  background: rgba(20, 32, 58, 0.88);
}

#map-toolbar {
  position: absolute;
  top: 20px;
  left: 8px;

  display: flex;
  flex-direction: column;

  background: rgba(10, 20, 40, 0.9);
  border-radius: 12px;
  overflow: hidden;

  box-shadow: 0 10px 25px rgba(0,0,0,0.3); 

  z-index: 1000;
}

#map-toolbar.detail {
  left: 300px;
}

.toolbar-button {
  width: 60px;
  height: 60px;

  border: none;
  background: transparent;
  color: #f2c94c;

  font-size: 14px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar-button svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.toolbar-button:hover {
  color: rgba(20, 32, 58, 0.95);
  background: #f2c94c;
}

.toolbar-button.active {
  color: rgba(20, 32, 58, 0.95);
  background: #f2c94c;
}

/* Overlay-Panel */
#map-panel {
  position: absolute;
  top: 20px;
  left: 8px;

  width: 280px;
  height: calc(100vh - 40px);

  display: flex;
  flex-direction: column;

  background: rgba(5, 18, 35, 0.94);
  color: #f2c94c;
  border-radius: 18px;
  padding: 20px;

  box-sizing: border-box;
  overflow-y: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);

  z-index: 1000;

  opacity: 1;
  transform: translateX(0);
  transition: opacity 220ms ease, transform 220ms ease;
}

/* Versteckter Zustand */
#map-panel.hidden {
  opacity: 0;
  transform: translateX(-16px);
  pointer-events: none;
}

/* Header im Panel */
#panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

#panel-search-view:not(.hidden),
#panel-filter-view:not(.hidden),
#info-toggle-view:not(.hidden) {
  min-height: 0;
  flex: 1;
}

#panel-search-view {
    display: flex;
    flex-direction: column;
}

#panel-title {
  margin: 0;
  font-size: 36px;
  font-weight: bold;
}

#panel-close {
  border: none;
  background: transparent;
  color: #f2c94c;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.panel-view {
  min-height: 0;
}

#panel-filter-view {
  overflow-y: auto;
}

/* Views im Panel */
.panel-view.hidden {
  display: none !important;
}

/* Steuerungselemente im Panel */
.panel-controls {
  margin-bottom: 16px;
}

.info-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
}

.info-card p {
  margin: 0;
  font-size: 0.8rem;
}

#search-bar,
#category-filter,
#district-filter {
  width: 100%;
  box-sizing: border-box;

  padding: 12px 14px;
  margin-bottom: 12px;

  background-color: rgba(5, 18, 35, 0.94);
  color: #f2c94c;

  border: 1px solid #d6d6d6;
  border-radius: 10px;

  font-size: 16px;
}

#search-bar:focus,
#category-filter:focus,
#district-filter:focus {
  outline: none;
  border-color: #4a7cff;
  box-shadow: 0 0 0 2px rgba(74, 124, 255, 0.15);
}

/* Ortsliste */
#place-list {
  margin-top: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.place-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  color: white;
  line-height: 1.4;
}

.place-item:hover {
  opacity: 0.8;
}

/* Default-Button oben in der Karte */
#default-button {
  position: absolute;
  top: 20px;
  right: 20px;

  display: none;
  padding: 10px 16px;

  border: none;
  border-radius: 10px;
  background: rgba(10, 20, 40, 0.75);
  color: #f2c94c;
  cursor: pointer;

  z-index: 1000;
}

#default-button:hover {
  background: rgba(20, 32, 58, 0.95);
}

/* Detailbereich */
#place-detail {
  box-sizing: border-box;
  max-width: none;
  margin: 0;
  padding: 0 24px;

  height: 0;
  overflow: hidden;

  opacity: 0;
  transform: translateY(24px);
  visibility: hidden;
  pointer-events: none;

  transition:
    height 280ms ease,
    opacity 220ms ease,
    transform 280ms ease,
    padding 280ms ease,
    visibility 0s linear 280ms;
}

body.detail-view #place-detail {
  height: 67vh;
  padding: 24px;
  overflow-y: auto;

  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;

  transition:
    height 280ms ease,
    opacity 220ms ease,
    transform 280ms ease,
    padding 280ms ease,
    visibility 0s linear 0s;
}

/* Detail-View */
body.detail-view #map-title,
body.detail-view #map-toolbar,
body.detail-view #map-panel {
  display: none;
}

body.detail-view #app {
  height: 33vh;
}

body.detail-view #map {
  height: 33vh;
}

/* Marker */
.marker {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent; 
  border: 2px solid #f2c94c;   
}

.marker-square {
  width: 10px;
  height: 10px;
  background: transparent;
  border: 2px solid #f2c94c;
}

.marker-triangle {
  width: 10px;
  height: 10px;
  background: transparent;
  border-left: 2px solid #f2c94c;
  border-bottom: 2px solid #f2c94c;
  transform: rotate(-45deg);
}

.marker-triangle:hover {
  transform: rotate(-45deg) scale(1.2);
}

.marker-circle:hover,
.marker-square:hover {
  transform: scale(1.2);
}

.leaflet-control-zoom a {
  background: rgba(10, 20, 40, 0.9);
  color: white;
  border: none;
}

.leaflet-control-zoom a:hover {
  background: #f2c94c;
  color: #0b1020;
}

.place-article {
  max-width: 1200px;
  margin: 0 auto;
  color: #f3f4f6;
}

.place-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.place-eyebrow {
  margin: 0 0 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f2c94c;
}

.place-title {
  margin: 0 0 12px;
  font-size: 2.2rem;
  line-height: 1.1;
  color: white;
}

.place-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 16px;
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
}

.place-meta span::before {
  content: "• ";
  opacity: 0.5;
}

.place-meta span:first-child::before {
  content: "";
}

.place-lead {
  margin: 0;
  max-width: 850px;
  font-size: 1.08rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.92);
}

.place-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  align-items: start;
}

.place-main,
.place-side {
  min-width: 0;
}

.place-section {
  margin-bottom: 28px;
}

.place-section h3,
.place-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #f2c94c;
}

.place-section p {
  margin: 0;
  line-height: 1.75;
  color: rgba(255,255,255,0.92);
}

.place-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 18px 18px 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(6px);
}

.place-facts {
  margin: 0;
}

.place-facts div {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.place-facts div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.place-facts dt {
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.place-facts dd {
  margin: 0;
  line-height: 1.5;
  color: white;
}

.place-tags {
  margin: 0;
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
}

.place-sources-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(255,255,255,0.9);
}

.place-sources-list li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.place-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(242, 201, 76, 0.14);
  color: #f2c94c;
}

.place-badge--high {
  background: rgba(72, 187, 120, 0.16);
  color: #7ddc98;
}

.place-badge--medium {
  background: rgba(242, 201, 76, 0.16);
  color: #f2c94c;
}

.place-badge--low {
  background: rgba(239, 68, 68, 0.16);
  color: #ff8b8b;
}

@media (max-width: 900px) {
  .place-layout {
    grid-template-columns: 1fr;
  }

  .place-title {
    font-size: 1.8rem;
  }
}

/* Filterstyling */

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.filter-section h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f2c94c;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.filter-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.filter-option input[type="checkbox"] {
  accent-color: #f2c94c;
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.filter-option span {
  line-height: 1.3;
}

.filter-reset-button {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(242, 201, 76, 0.45);
  border-radius: 10px;
  background: rgba(10, 20, 40, 0.55);
  color: #f2c94c;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.filter-reset-button:hover {
  color: #0b1020;
  background: #f2c94c;
  border-color: #f2c94c;
}

/*Mobile Ansicht für Handys */

@media (max-width: 700px) {
  #app, #map {
    height: 100dvh;
  }

  #map-title {
    top: 14px;
    max-width: 70vw;
   
    padding: 6px 12px;

    text-align: center;
    line-height: 1.2;

    font-size: 12px;
    border-radius: 14px;
  }

  #map-toolbar {
    top: 20px;
    left: 8px;}
  
  .toolbar-button {
    width: 52px;
    height: 52px;
  }

  .toolbar-button svg {
    width: 21px;
    height: 21px;
  }

  #map-panel {
    top: 0px;
    left: 0px;
    right: 0px;
    width: auto;
    height: 100dvh;
    max-height: none;
    padding: 18px;
  }

  #panel-title {
    font-size: 28px;
  }

  #place-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .filter-option {
    padding: 12px 10px;
    font-size: 20px;
  }

  .filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
  }

  .place-sources-list {
    font-size: 20px;
    padding: 12px 10px;
  }

  body.detail-view #app {
    height: 38dvh;
  }

  body.detail-view #map {
    height: 38dvh;
  }

  body.detail-view #place-detail {
    height: 62dvh;
    padding: 18px;
  }

  .place-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .place-title {
    font-size: 1.7rem;
  }

  .place-lead {
    font-size: 1rem;
  }

  .place-card {
    padding: 8px;
  }

  .place-section {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 18px 18px 16px;
  margin-bottom: 8px;
  backdrop-filter: blur(6px);
}
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: #f2c94c;
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(242, 201, 76, 0.22);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: #f2c94c;
  color: #111827;
  font-weight: 800;
  font-size: 13px;
  border-radius: 50%;
}

/*PopUp-Styling*/

.place-popup .leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.96);
  color: rgba(255, 255, 255, 0.9);
}

.place-popup .leaflet-popup-tip {
  background: rgba(15, 23, 42, 0.96);
}

.popup-place {
  display: flex;
  flex-direction: column;
}

.popup-place strong {
  font-size: 15px;
}

.popup-place span {
  color: #f2c94c;
  font-size: 13px;
  margin-top: 4px;
}