/* ==================== RESET & BASE ==================== */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: #faf8ef;
  min-height: 100vh;
}

#map {
  height: 100vh;
  width: 100vw;
  display: block;
}

/* ==================== SUCHLEISTE ==================== */
.search-bar-container {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  background: #fff;
  border: 3px solid #C4A000;
  border-radius: 8px;
  box-shadow: 0 2px 14px rgba(160, 120, 0, 0.13);
  padding: 8px 18px;
  display: flex;
  align-items: center;
  min-width: 280px;
  max-width: 94vw;
  width: 410px;
  gap: 8px;
}

.search-bar-input {
  flex: 1;
  font-size: 1.16em;
  padding: 8px 12px;
  border: 1.5px solid #C4A000;
  border-radius: 5px;
  outline: none;
  background: #fff;
  font-family: inherit;
}

.search-bar-input:focus {
  border-color: #a87d00;
  box-shadow: 0 0 0 2px rgba(196, 160, 0, 0.1);
}

.search-bar-btn {
  background: #C4A000;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 22px;
  font-size: 1.08em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.18s;
  font-family: inherit;
  box-shadow: 0 1px 4px rgba(160, 120, 0, 0.06);
}

.search-bar-btn:hover {
  background: #a87d00;
}

/* Autocomplete Ergebnisse */
.search-bar-results {
  position: absolute;
  top: 46px;
  left: 0;
  right: 0;
  background: #fff;
  border: 2px solid #C4A000;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 210px;
  overflow-y: auto;
  z-index: 1201;
  box-shadow: 0 6px 24px rgba(160, 120, 0, 0.09);
  display: none;
  font-size: 1.11em;
}

.search-bar-results.active {
  display: block;
}

.search-bar-result {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f4e2ab;
  background: #fff;
  font-family: inherit;
  transition: background 0.15s;
}

.search-bar-result:last-child {
  border-bottom: none;
}

.search-bar-result:hover,
.search-bar-result.active {
  background: #ffe9b0;
}

/* ==================== LEGENDE ==================== */
.legend {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: #fffff0;
  border: 1px solid #C4A000;
  padding: 8px 10px;
  font-size: 12px;
  z-index: 999;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.legend strong {
  display: block;
  margin-bottom: 6px;
  color: #333;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #333;
  flex-shrink: 0;
}

.legend a {
  color: #C4A000;
  text-decoration: none;
  transition: color 0.2s;
}

.legend a:hover {
  color: #a87d00;
  text-decoration: underline;
}

/* ==================== CLUSTER MARKER ==================== */
.stoneSquare {
  width: 46px;
  height: 46px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  color: #000;
  background: #C4A000;
  border: 2px solid #444;
  border-radius: 4px;
  font-size: 18px;
  user-select: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 600px) {
  .search-bar-container {
    width: calc(100% - 40px);
    min-width: unset;
  }
  
  .legend {
    font-size: 11px;
    padding: 6px 8px;
  }
}