/**
 * Regions API Documentation - Specific Styles.
 *
 * This stylesheet contains styles specific to the Regions API documentation page, including the choropleth map preview
 * and its metric toggle, legend, and popups.
 */

/* The toolbar stacks above the map inside the shared .map-container frame. */
#regions-preview {
  display: flex;
  flex-direction: column;
  background-color: white;
}

/* The metric selector sits above the map rather than on it, so a region popup can never cover it. */
.regions-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border-light, #e0e0e0);
  background-color: #fafafa;
  font-family: var(--font-sans);
  font-size: 13px;
  color: #222222;
}

.regions-toolbar label {
  font-weight: 600;
}

.regions-toolbar select {
  font-family: var(--font-primary);
  font-size: 13px;
  padding: 2px 4px;
  border: 1px solid #cccccc;
  border-radius: 3px;
}

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

/* ---- Loading Message ---- */

.loading-message {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #666666;
  font-style: italic;
  background-color: #f8f9fa;
}

.loading-message::before {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid #e0e0e0;
  border-top: 2px solid var(--color-accent-link, #007bff);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

/* ---- No Regions Message ---- */

.no-regions-message {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  padding: 8px 12px;
  border-radius: 4px;
  box-shadow: 0 1px 5px rgb(0 0 0 / 40%);
  font-size: 14px;
  color: #666666;
  z-index: 1000;
  white-space: nowrap;
}

