html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
}

#app {
  display: flex;
  height: 100%;
  position: relative;
}

#controls {
  width: 320px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.95);
  overflow-y: auto;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

#controls h1 {
  font-size: 1.4rem;
  margin-top: 0;
}

#controls label {
  display: block;
  margin-top: 12px;
  font-weight: bold;
}

#controls input,
#controls select {
  width: 100%;
  padding: 8px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

#controls .button-row {
  display: flex;
  gap: 8px;
}

#controls button {
  margin-top: 18px;
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  background-color: #007bff;
  color: #fff;
  cursor: pointer;
}

#controls button.secondary {
  background-color: #f5f5f5;
  color: #222;
  border: 1px solid #ccc;
}

#controls button.secondary:hover {
  background-color: #e0e0e0;
}

#controls button + button {
  margin-top: 0;
}

#controls button:hover {
  background-color: #0056b3;
}

#status {
  margin-top: 12px;
  min-height: 24px;
  font-size: 0.95rem;
}

#summary,
#results {
  margin-top: 16px;
}

#summary.hidden,
#results.hidden {
  display: none;
}

#results h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

#results-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 240px;
  overflow-y: auto;
}

#results-list li {
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 4px;
  margin-bottom: 8px;
  background: #fafafa;
  font-size: 0.95rem;
}

#results-list li strong {
  display: block;
  font-size: 1.05rem;
}

#map {
  flex: 1;
  height: 100%;
}

#loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}

#loader.hidden {
  display: none;
}

.spinner {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #007bff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  #app {
    flex-direction: column;
  }

  #controls {
    width: 100%;
    box-shadow: none;
  }

  #map {
    height: calc(100% - 340px);
  }
}
