html, body, #map {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

/* Custom Attribution Styles */
#custom-attribution {
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  padding: 2px 8px;
  font: 12px/20px Arial, Helvetica, sans-serif;
  color: #333;
}

#custom-attribution a {
  text-decoration: underline;
  color: #333;
}

#attribution-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 16px;
  line-height: 20px;
  color: #333;
}

/* Style Picker Control */
#style-picker {
  position: relative;
  background: white;
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
  clear: right;
  margin-top: 4px;
}

.style-picker-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: background-color 0.2s;
  width: 36px;
  height: 36px;
}

.style-picker-button:hover {
  background-color: #f5f5f5;
}

.style-picker-icon {
  font-size: 18px;
  line-height: 1;
  display: block;
}

.style-picker-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: white;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  min-width: 100px;
  width: auto;
  overflow: hidden;
  z-index: 1000;
}

.style-picker-menu > .style-option {
  width: 100%;
}

.style-picker-menu.visible {
  display: block;
}

.style-option {
  display: block !important;
  width: 100% !important;
  padding: 10px 16px;
  text-align: left;
  background: white;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: background-color 0.2s;
  box-sizing: border-box !important;
  margin: 0 !important;
  min-width: 100% !important;
}

.style-option:last-child {
  border-bottom: none;
}

.style-option:hover {
  background-color: #f5f5f5;
}

.style-option.active {
  background-color: #e3f2fd !important;
  color: #1976d2;
  font-weight: 500;
}

.style-option.active:hover {
  background-color: #bbdefb;
}

/* Cluster marker styles - now using inline styles instead */

/* Region Popup Styles */
.region-popup {
  min-width: 200px;
  max-width: 300px;
}

.region-popup-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: bold;
  color: #2d5016;
}

.region-popup-description {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

.region-popup-info {
  margin: 4px 0;
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

.region-popup-info strong {
  color: #333;
  font-weight: 600;
}

/* MapLibre Popup customization for regions */
.maplibregl-popup-content {
  border-radius: 4px;
  padding: 12px 16px;
}

/* Search Control Styles */
#search-control {
  background: white;
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
  min-width: 300px;
  max-width: 400px;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

#search-input {
  flex: 1;
  padding: 8px 12px 8px 8px;
  border: none;
  border-radius: 0 4px 4px 0;
  font-size: 14px;
  outline: none;
  background: white;
  color: #333;
}

#search-input::placeholder {
  color: #999;
}

#search-button {
  padding: 8px 10px;
  border: none;
  border-radius: 4px 0 0 4px;
  background: white;
  cursor: pointer;
  font-size: 16px;
  color: #333;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

#search-button svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

#search-button:hover {
  background-color: #f5f5f5;
}

.search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 2px;
}

.search-results.visible {
  display: block;
}

.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 13px;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: #f5f5f5;
}

.search-result-item.active {
  background-color: #e3f2fd;
}

.search-result-name {
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}

.search-result-details {
  font-size: 11px;
  color: #666;
}

.search-result-item.loading {
  text-align: left;
  color: #666;
  font-style: italic;
}

.search-result-item.error {
  color: #666;
  text-align: left;
}

/* Controls Row - for side-by-side layout */
.controls-row {
  display: flex;
  align-items: flex-start;
  gap: 0px;
}

/* Geolocation Control Styles */
#geolocation-control {
  background: white;
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.geolocation-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: white;
  margin-top:4px; 
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  color: #333;
  transition: background-color 0.2s;
  width: 36px;
  height: 36px;
}

.geolocation-button:hover {
  background-color: #f5f5f5;
}

.geolocation-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.geolocation-button.locating {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
} 