#offline-extracts-app {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 8px;
}

#offline-extracts-map {
  position: relative;
  width: 100%;
  height: 600px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  /* Land colour: the basemap draws water and labels on top of this. */
  background: #f4f1ea;
}

/* Leaflet paints its own background; keep it matching the land colour. */
#offline-extracts-map.leaflet-container {
  background: #f4f1ea;
  font: inherit;
}

#offline-extracts-map .leaflet-control-attribution {
  font-size: 0.7rem;
}

#offline-extracts-panel {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fafbfc;
}

#offline-extracts-panel .placeholder {
  color: #57606a;
  margin: 0;
}

#offline-extracts-panel .panel-heading {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #57606a;
}

/* The extracts covering the clicked point are listed one per row below the
   full-width map. */
#offline-extracts-panel .extract-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#offline-extracts-panel .extract-row {
  padding: 8px 0;
  border-top: 1px solid #e3e7eb;
  line-height: 1.5;
}

#offline-extracts-panel .extract-row:first-child {
  border-top: none;
  padding-top: 0;
}

#offline-extracts-panel .extract-name {
  font-weight: 600;
}

#offline-extracts-panel .extract-alt {
  color: #57606a;
}

#offline-extracts-panel .extract-type {
  font-weight: 600;
}

#offline-extracts-panel .extract-type.country      { color: #3b8de4; }
#offline-extracts-panel .extract-type.admin1       { color: #8a4fbf; }
#offline-extracts-panel .extract-type.city_cluster { color: #dc6b1f; }

#offline-extracts-panel .extract-includes {
  color: #3a3a3a;
}

#offline-extracts-legend {
  font-size: 0.9rem;
  color: #57606a;
  margin-bottom: 24px;
}

#offline-extracts-legend .swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 2px;
  vertical-align: middle;
  margin: 0 4px 0 14px;
}

#offline-extracts-legend .swatch.country { background: #3b8de4; }
#offline-extracts-legend .swatch.admin1  { background: #8a4fbf; }
#offline-extracts-legend .swatch.city    { background: #dc6b1f; }

/* Localized loading text (markup lives in the shared include), shown centred on
   the map only while the app is in its loading state. */
.offline-extracts-loading {
  display: none;
}

#offline-extracts-app.loading .offline-extracts-loading {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  color: #57606a;
  font-style: italic;
  z-index: 500;
  pointer-events: none;
}

@media (max-width: 800px) {
  #offline-extracts-map {
    height: 420px;
  }
}
