/* Bone Dry Projects Map 1.0.0
   Every selector starts with .bdpm, so nothing here can reach the host page. The reset block below sets
   every property a theme is likely to have changed, so the widget looks the same on any page.
   !important is used only where the site's theme itself uses it on bare elements (every outline, the labels,
   the background and border of selects and search fields) and in the two rules for the hidden attribute;
   each place says so. */

.bdpm {
  --bdpm-red: #e10f0c;
  --bdpm-blue: #1565c0;
  --bdpm-ink: #2b2b2b;
  --bdpm-text: #4a4a4a;
  --bdpm-muted: #6b6b6b;
  --bdpm-line: #dcdcdc;
  /* The edge of the two selects and of the search field: 3.36:1 on white, so the fields can be found. */
  --bdpm-field-line: #8c8c8c;
  --bdpm-hair: #ececec;
  --bdpm-panel: #fafafa;
  --bdpm-body-h: clamp(420px, calc(100vh - 230px), 760px);
  position: relative;
  isolation: isolate;
  display: block;
  box-sizing: border-box;
  /* The gap to what follows on the page: the site's text block around the widget brings none. */
  margin: 0 0 30px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bdpm-text);
  font: 400 14px/1.45 "Open Sans", Arial, Helvetica, sans-serif;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  overflow-wrap: normal;
  word-break: normal;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ---------- reset: our own elements only, never the map library's ---------- */

.bdpm .bdpm-toolbar, .bdpm .bdpm-toolbar *,
.bdpm .bdpm-status, .bdpm .bdpm-status *,
.bdpm .bdpm-msg,
.bdpm .bdpm-tabs, .bdpm .bdpm-tabs *,
.bdpm .bdpm-body,
.bdpm .bdpm-list, .bdpm .bdpm-list *,
.bdpm .bdpm-mapwrap,
.bdpm .bdpm-map,
.bdpm .bdpm-card, .bdpm .bdpm-card *,
.bdpm .bdpm-attrib, .bdpm .bdpm-attrib *,
.bdpm .bdpm-mapmsg,
.bdpm .bdpm-states, .bdpm .bdpm-states *,
.bdpm .bdpm-sr,
.bdpm noscript, .bdpm .bdpm-noscript {
  box-sizing: border-box;
  float: none;
  width: auto;
  min-width: 0;
  max-width: none;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  list-style: none;
  opacity: 1;
  overflow-wrap: inherit;
  word-break: inherit;
  text-align: inherit;
  text-decoration: none;
  text-indent: 0;
  text-shadow: none;
  text-transform: inherit;
  transition: none;
  vertical-align: baseline;
  white-space: normal;
}

.bdpm .bdpm-toolbar *::before, .bdpm .bdpm-toolbar *::after,
.bdpm .bdpm-status *::before, .bdpm .bdpm-status *::after,
.bdpm .bdpm-tabs *::before, .bdpm .bdpm-tabs *::after,
.bdpm .bdpm-list *::before, .bdpm .bdpm-list *::after,
.bdpm .bdpm-card *::before, .bdpm .bdpm-card *::after,
.bdpm .bdpm-attrib *::before, .bdpm .bdpm-attrib *::after,
.bdpm .bdpm-states *::before, .bdpm .bdpm-states *::after {
  box-sizing: border-box;
  content: none;
}

/* !important: a hidden part stays hidden whatever display value a rule below or the theme gives it. */
.bdpm [hidden] {
  display: none !important;
}

.bdpm img,
.bdpm canvas {
  max-width: none;
}

.bdpm button,
.bdpm select,
.bdpm input {
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

/* ---------- focus: 2 px blue ring, drawn inside where an outer ring would be cut off ----------
   !important: the site's theme has "* { outline: none !important }", which would hide every focus ring. */

.bdpm a:focus,
.bdpm button:focus,
.bdpm select:focus,
.bdpm input:focus,
.bdpm summary:focus,
.bdpm [tabindex]:focus {
  outline: 2px solid var(--bdpm-blue) !important;
  outline-offset: 2px;
}

.bdpm .bdpm-row:focus,
.bdpm .bdpm-more:focus,
.bdpm .bdpm-skip:focus,
.bdpm .bdpm-card-close:focus,
.bdpm .bdpm-projs:focus,
.bdpm .bdpm-states summary:focus,
.bdpm .maplibregl-canvas:focus,
.bdpm .maplibregl-ctrl-group button:focus {
  outline-offset: -2px;
}

.bdpm a:focus:not(:focus-visible),
.bdpm button:focus:not(:focus-visible),
.bdpm summary:focus:not(:focus-visible),
.bdpm [tabindex]:focus:not(:focus-visible) {
  outline: none !important;
}

/* ---------- toolbar ---------- */

.bdpm .bdpm-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: 0 0 12px;
}

/* 240 px: the longest choice, "Residential and retail sales", shows in full from 992 px up. */
.bdpm .bdpm-field {
  display: block;
  flex: 1 1 200px;
  max-width: 240px;
}

.bdpm .bdpm-field-search {
  flex: 2 1 220px;
  max-width: none;
}

/* !important: the site's theme sets the weight and bottom margin of every label that way. */
.bdpm .bdpm-field label {
  display: block;
  margin: 0 0 4px !important;
  color: var(--bdpm-muted);
  font-size: 12px;
  font-weight: 600 !important;
  line-height: 16px;
}

/* !important: the site's theme sets the background and border colour of selects and search fields that way
   when they are hovered or focused. */
.bdpm .bdpm-field select,
.bdpm .bdpm-field input {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--bdpm-field-line);
  border-color: var(--bdpm-field-line) !important;
  border-radius: 4px;
  background: #fff none !important;
  color: var(--bdpm-ink);
  font-size: 14px;
  line-height: normal;
  /* One line always: a long choice ("Commercial projects" on a phone) is cut with an ellipsis, not wrapped. */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bdpm .bdpm-field select {
  padding-right: 34px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5l4.5 4.5 4.5-4.5' fill='none' stroke='%236b6b6b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center !important;
  cursor: pointer;
}

.bdpm .bdpm-field select:hover,
.bdpm .bdpm-field input:hover {
  border-color: var(--bdpm-muted) !important;
}

/* No browser-drawn clear button in the search box: some themes hide it, some browsers have none. */
.bdpm .bdpm-field input::-webkit-search-cancel-button,
.bdpm .bdpm-field input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.bdpm .bdpm-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--bdpm-line);
  border-radius: 4px;
  background-color: #fff;
  color: var(--bdpm-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.bdpm .bdpm-btn:hover {
  border-color: var(--bdpm-muted);
}

.bdpm .bdpm-btn[aria-busy="true"] {
  opacity: 0.6;
  cursor: progress;
}

.bdpm .bdpm-btn-near::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 0 7px 0 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='3.3' fill='none' stroke='%232b2b2b' stroke-width='1.5'/%3E%3Cpath d='M7 .8V3M7 11v2.2M.8 7H3M11 7h2.2' stroke='%232b2b2b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
}

.bdpm .bdpm-btn-quiet {
  padding: 0 8px;
  border-color: transparent;
  background-color: transparent;
  color: var(--bdpm-red);
}

.bdpm .bdpm-btn-quiet:hover {
  border-color: transparent;
  text-decoration: underline;
}

/* ---------- status line, chip, legend, message ---------- */

.bdpm .bdpm-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-height: 32px;
  margin: 0 0 10px;
}

/* The summary quotes the search text, which can be one long word with no space to break at. Such a word breaks
   anywhere, and the line may be narrower than the word: the page never grows wider than the window. */
.bdpm .bdpm-summary {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  color: var(--bdpm-ink);
  overflow-wrap: anywhere;
}

.bdpm .bdpm-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  height: 30px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--bdpm-line);
  border-radius: 4px;
  background-color: var(--bdpm-panel);
  color: var(--bdpm-ink);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.bdpm .bdpm-chip:hover {
  border-color: var(--bdpm-muted);
}

.bdpm .bdpm-chip-x {
  margin: 0 0 0 7px;
  color: var(--bdpm-muted);
  font-size: 17px;
}

/* "Copy link": a quiet text button with a small chain icon. At every width it is as wide as the longer of its
   two texts: 104 px holds "Link copied" (102.5 px, 103.2 px in the fallback font). The button keeps its size
   for the 2.5 s it says so, and nothing beside or below it moves. */
.bdpm .bdpm-share {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 104px;
  height: 30px;
  padding: 0 6px;
  border-radius: 4px;
  background-color: transparent;
  color: var(--bdpm-blue);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

/* At every width the button keeps its box while it is hidden, so the status line is laid out the same with
   and without a link, and nothing above the map moves when a place is opened or closed.
   !important: answers the general rule for the hidden attribute above, which carries it. A part that is
   not visible takes no focus, no click and is not read out; the attribute stays the truth for scripts. */
.bdpm .bdpm-share[hidden] {
  display: inline-flex !important;
  visibility: hidden;
}

.bdpm .bdpm-share::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 0 5px 0 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M5.9 8.1a2.6 2.6 0 0 0 3.7 0l2-2a2.6 2.6 0 0 0-3.7-3.7l-.7.7M8.1 5.9a2.6 2.6 0 0 0-3.7 0l-2 2a2.6 2.6 0 0 0 3.7 3.7l.7-.7' fill='none' stroke='%231565c0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}

.bdpm .bdpm-share:hover {
  text-decoration: underline;
}

/* Text for screen readers only (and the field a link is copied from where the clipboard cannot be written). */
.bdpm .bdpm-sr {
  position: absolute;
  display: block;
  width: 1px;
  min-width: 0;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.bdpm .bdpm-legend {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 0 auto;
}

.bdpm .bdpm-legend-item {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
}

/* One coloured mark for every place a project type is named: legend, list counts, card. The shape tells the
   type as well as the colour: a red circle for commercial projects, a blue square of the same size for
   residential and retail sales. */
.bdpm .bdpm-kind-c::before,
.bdpm .bdpm-kind-r::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin: 0 5px 0 0;
  border-radius: 1px;
  background: var(--bdpm-blue);
  forced-color-adjust: none;
}

.bdpm .bdpm-kind-c::before {
  border-radius: 50%;
  background: var(--bdpm-red);
}

.bdpm .bdpm-msg {
  display: block;
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 1px solid var(--bdpm-line);
  border-left: 3px solid var(--bdpm-ink);
  border-radius: 4px;
  background: var(--bdpm-panel);
  color: var(--bdpm-ink);
  /* A message can hold a link, which has no spaces to break at. */
  overflow-wrap: anywhere;
}

/* ---------- tabs (phone only) ---------- */

.bdpm .bdpm-tabs {
  display: none;
  margin: 0 0 8px;
}

.bdpm .bdpm-tab {
  position: relative;
  display: block;
  flex: 1 1 0;
  height: 40px;
  border: 1px solid var(--bdpm-line);
  border-radius: 4px 0 0 4px;
  background-color: #fff;
  color: var(--bdpm-text);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}

.bdpm .bdpm-tab + .bdpm-tab {
  margin: 0 0 0 -1px;
  border-radius: 0 4px 4px 0;
}

.bdpm .bdpm-tab[aria-selected="true"] {
  z-index: 1;
  border-color: var(--bdpm-ink);
  background-color: var(--bdpm-ink);
  color: #fff;
}

.bdpm .bdpm-tab:focus {
  z-index: 2;
}

/* ---------- body: list on the left, map on the right ---------- */

.bdpm .bdpm-body {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  height: var(--bdpm-body-h);
  overflow: hidden;
  border: 1px solid var(--bdpm-line);
  border-radius: 4px;
  background: #fff;
}

.bdpm .bdpm-list {
  position: relative;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  /* A row that gets the focus is scrolled clear of the count line, which sticks to the top (33 px high). */
  scroll-padding-top: 34px;
  border-right: 1px solid var(--bdpm-line);
  background: var(--bdpm-panel);
}

/* "Skip the list": the first stop inside the list panel. It takes no room and cannot be seen until it has the
   focus. Focused, it lies over the count line at the top of the panel, also when the list is scrolled, and
   moves nothing: its bottom margin takes back the height it has. */
.bdpm .bdpm-skip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: block;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background-color: #fff;
  color: var(--bdpm-blue);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
  opacity: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  cursor: pointer;
}

.bdpm .bdpm-skip:focus {
  position: sticky;
  width: 100%;
  height: 33px;
  margin: 0 0 -33px;
  padding: 0 12px;
  border-bottom: 1px solid var(--bdpm-line);
  opacity: 1;
  clip: auto;
  clip-path: none;
}

/* The button lies in the room that is kept clear for the count line. While it has the focus that room is
   given up, or the browser would scroll a list that had been scrolled to bring the button out of it. */
.bdpm .bdpm-list:has(> .bdpm-skip:focus) {
  scroll-padding-top: 0;
}

.bdpm .bdpm-count {
  position: sticky;
  top: 0;
  z-index: 1;
  display: block;
  padding: 8px 12px;
  border-bottom: 1px solid var(--bdpm-line);
  background: var(--bdpm-panel);
  color: var(--bdpm-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.bdpm .bdpm-rows,
.bdpm .bdpm-rows li {
  display: block;
}

.bdpm .bdpm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--bdpm-hair);
  background-color: transparent;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.bdpm .bdpm-row:hover {
  background-color: #f0f0f0;
}

.bdpm .bdpm-row[aria-current="true"] {
  background-color: #fff;
  box-shadow: inset 3px 0 0 var(--bdpm-ink);
}

.bdpm .bdpm-row-name {
  display: block;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.bdpm .bdpm-row-city {
  color: var(--bdpm-ink);
  font-weight: 700;
}

.bdpm .bdpm-row-zip {
  color: var(--bdpm-muted);
}

.bdpm .bdpm-row-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0 0 0 10px;
  font-size: 13px;
  white-space: nowrap;
}

.bdpm .bdpm-row-dist {
  color: var(--bdpm-muted);
}

.bdpm .bdpm-n {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0 9px;
  color: var(--bdpm-ink);
  font-variant-numeric: tabular-nums;
}

.bdpm .bdpm-more {
  display: block;
  width: 100%;
  height: 44px;
  background-color: transparent;
  color: var(--bdpm-blue);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}

.bdpm .bdpm-more:hover {
  text-decoration: underline;
}

.bdpm .bdpm-empty {
  display: block;
  padding: 16px 12px;
}

.bdpm .bdpm-empty-clear {
  display: block;
  height: 40px;
  margin: 10px 0 0;
  padding: 0 16px;
  border: 1px solid var(--bdpm-line);
  border-radius: 4px;
  background-color: #fff;
  color: var(--bdpm-ink);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.bdpm .bdpm-empty-clear:hover {
  border-color: var(--bdpm-muted);
}

/* ---------- map box ----------
   The map fills the box. The attribution line and the docked card sit in a column at its bottom edge, so
   the attribution always stays visible above the card. */

.bdpm .bdpm-mapwrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  background: #f2f3f0;
}

.bdpm .bdpm-map {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  overflow: hidden;
}

/* Only once the script runs (it marks the root with bdpm-js as its first act): without the script nothing
   is loading, and the box stays quiet. */
.bdpm.bdpm-js[data-map="waiting"] .bdpm-map::before,
.bdpm.bdpm-js[data-map="loading"] .bdpm-map::before {
  content: "Loading map\2026";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  margin: -10px 0 0;
  color: var(--bdpm-muted);
  font-size: 13px;
  line-height: 20px;
  text-align: center;
}

.bdpm .bdpm-attrib {
  position: relative;
  z-index: 1;
  order: 1;
  display: block;
  flex: 0 0 auto;
  max-width: 100%;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--bdpm-text);
  font-size: 11px;
  line-height: 16px;
}

.bdpm .bdpm-attrib a {
  color: inherit;
}

.bdpm .bdpm-attrib a:hover {
  text-decoration: underline;
}

.bdpm .bdpm-mapmsg {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: block;
  max-width: calc(100% - 70px);
  padding: 6px 10px;
  border: 1px solid var(--bdpm-line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--bdpm-ink);
  font-size: 13px;
  line-height: 1.35;
}

.bdpm[data-map="failed"] .bdpm-attrib {
  display: none;
}

.bdpm[data-map="failed"] .bdpm-mapmsg {
  top: 50%;
  left: 50%;
  width: 290px;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  text-align: center;
  transform: translate(-50%, -50%);
}

/* ---------- place card: docked to the bottom of a narrow map, or inside the popup of a wide one ----------
   Docked, it takes at most 55% of the map box (one pixel less, so a rounded height never reads as more). */

.bdpm .bdpm-card {
  position: relative;
  z-index: 2;
  order: 2;
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  align-self: stretch;
  max-height: calc(55% - 1px);
  border-top: 1px solid var(--bdpm-line);
  background: #fff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
}

.bdpm .maplibregl-popup-content .bdpm-card {
  width: 300px;
  max-height: 320px;
  overflow: hidden;
  border-top: 0;
  border-radius: 4px;
  box-shadow: none;
}

.bdpm .bdpm-card-head {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  padding: 6px 0 0 12px;
}

.bdpm .bdpm-card-title {
  display: block;
  flex: 1 1 auto;
  margin: 4px 0 0;
  color: var(--bdpm-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.bdpm .bdpm-card-close {
  position: relative;
  display: block;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin: -6px 0 0;
  border-radius: 4px;
  background-color: transparent;
  cursor: pointer;
}

.bdpm .bdpm-card-close::before,
.bdpm .bdpm-card-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 2px;
  margin: -1px 0 0 -7.5px;
  border-radius: 1px;
  background: var(--bdpm-muted);
  transform: rotate(45deg);
}

.bdpm .bdpm-card-close::after {
  transform: rotate(-45deg);
}

.bdpm .bdpm-card-close:hover::before,
.bdpm .bdpm-card-close:hover::after {
  background: var(--bdpm-ink);
}

.bdpm .bdpm-card-count {
  display: block;
  flex: 0 0 auto;
  padding: 0 12px 9px;
  border-bottom: 1px solid var(--bdpm-line);
  color: var(--bdpm-muted);
  font-size: 13px;
}

.bdpm .bdpm-projs {
  display: block;
  flex: 1 1 auto;
  overflow-y: auto;
}

.bdpm .bdpm-proj {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  padding: 8px 12px;
  border-bottom: 1px solid var(--bdpm-hair);
}

.bdpm .bdpm-proj:last-child {
  border-bottom: 0;
}

.bdpm .bdpm-proj-title {
  flex: 1 1 auto;
  margin: 0 10px 0 0;
  color: var(--bdpm-ink);
  font-weight: 700;
}

.bdpm .bdpm-proj-kind {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  font-size: 13px;
}

.bdpm .bdpm-proj-meta {
  flex: 1 1 100%;
  margin: 1px 0 0;
  color: var(--bdpm-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* ---------- map library parts ----------
   The page decides whether the library's stylesheet comes before or after this one. A rule here that
   competes with a rule of the library therefore carries one class more (.bdpm-map) than the library's,
   so the look does not depend on the order. */

/* The library sizes its parts as content boxes, and one of them in rem. A theme may have changed both. */
.bdpm .maplibregl-canvas-container,
.bdpm .maplibregl-canvas,
.bdpm .maplibregl-control-container,
.bdpm .maplibregl-ctrl-top-left,
.bdpm .maplibregl-ctrl-top-right,
.bdpm .maplibregl-ctrl-bottom-left,
.bdpm .maplibregl-ctrl-bottom-right,
.bdpm .maplibregl-ctrl-group,
.bdpm .maplibregl-ctrl-icon,
.bdpm .maplibregl-popup,
.bdpm .maplibregl-popup-content,
.bdpm .maplibregl-popup-tip,
.bdpm .maplibregl-cooperative-gesture-screen,
.bdpm .maplibregl-cooperative-gesture-screen > div {
  box-sizing: content-box;
}

.bdpm .maplibregl-cooperative-gesture-screen {
  padding: 16px;
}

/* The veil behind "Use two fingers to move the map": darker than the library's, so the white text can be read
   over the light map (about 6:1 instead of 3:1). */
.bdpm .bdpm-map .maplibregl-cooperative-gesture-screen {
  background: rgba(0, 0, 0, 0.6);
}

.bdpm .maplibregl-ctrl-group button {
  width: 32px;
  min-width: 0;
  height: 32px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: #fff;
  box-shadow: none;
  color: var(--bdpm-ink);
  font: inherit;
  letter-spacing: normal;
  text-shadow: none;
  text-transform: none;
}

.bdpm .maplibregl-ctrl-group button + button {
  border-top: 1px solid var(--bdpm-line);
}

.bdpm .maplibregl-ctrl-group button:first-child {
  border-radius: 4px 4px 0 0;
}

.bdpm .maplibregl-ctrl-group button:last-child {
  border-radius: 0 0 4px 4px;
}

.bdpm .bdpm-map .maplibregl-ctrl-group button:only-child {
  border-radius: 4px;
}

.bdpm .bdpm-map .maplibregl-ctrl-group button:hover {
  background-color: #f2f2f2;
}

/* One focus ring, ours, instead of the library's glow plus ours. */
.bdpm .bdpm-map .maplibregl-ctrl-group button:focus {
  box-shadow: none;
}

.bdpm .bdpm-reset .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M2.5 8.6L9 2.8l6.5 5.8M4.6 7.4v7.4h8.8V7.4' fill='none' stroke='%23333' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.bdpm .bdpm-map .maplibregl-popup-content {
  padding: 0;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.bdpm .bdpm-map .bdpm-tip .maplibregl-popup-content {
  padding: 4px 8px;
  background: var(--bdpm-ink);
  box-shadow: none;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
}

.bdpm .bdpm-tip .maplibregl-popup-tip {
  display: none;
}

/* ---------- projects by state ---------- */

/* The table scrolls sideways inside its box on the narrowest phones, where four columns do not fit. */
.bdpm .bdpm-states {
  display: block;
  overflow-x: auto;
  margin: 12px 0 0;
  border: 1px solid var(--bdpm-line);
  border-radius: 4px;
  background: #fff;
}

.bdpm .bdpm-states summary {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  color: var(--bdpm-ink);
  font-weight: 600;
  cursor: pointer;
}

.bdpm .bdpm-states summary::-webkit-details-marker {
  display: none;
}

.bdpm .bdpm-states summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin: -4px 4px 0 auto;
  border: solid var(--bdpm-muted);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.bdpm .bdpm-states[open] summary::after {
  margin-top: 4px;
  transform: rotate(225deg);
}

.bdpm .bdpm-states table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 13px;
}

.bdpm .bdpm-states th,
.bdpm .bdpm-states td {
  padding: 6px 12px;
  border-top: 1px solid var(--bdpm-hair);
  text-align: right;
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}

.bdpm .bdpm-states th:first-child {
  color: var(--bdpm-ink);
  text-align: left;
}

.bdpm .bdpm-states thead th {
  border-top-color: var(--bdpm-line);
  background: var(--bdpm-panel);
  color: var(--bdpm-muted);
  font-size: 12px;
  font-weight: 600;
}

/* The last row holds the totals of all states. */
.bdpm .bdpm-states .bdpm-states-total th,
.bdpm .bdpm-states .bdpm-states-total td {
  border-top-color: var(--bdpm-line);
  color: var(--bdpm-ink);
  font-weight: 600;
}

/* ---------- without the script, and without the data ---------- */

/* The note is the first thing in the widget, above the toolbar. */
.bdpm .bdpm-noscript {
  display: block;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid var(--bdpm-line);
  border-radius: 4px;
  background: var(--bdpm-panel);
  color: var(--bdpm-ink);
}

/* The data file could not be loaded (the script marks the root): the controls, the status line, the tabs and
   the empty list and map box would only look broken. The message and "Projects by state" stay. */
.bdpm.bdpm-nodata .bdpm-toolbar,
.bdpm.bdpm-nodata .bdpm-status,
.bdpm.bdpm-nodata .bdpm-tabs,
.bdpm.bdpm-nodata .bdpm-body {
  display: none;
}

/* ---------- tablet ---------- */

@media (max-width: 991px) {
  .bdpm .bdpm-body {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

/* ---------- phone: two rows of controls, then either the map or the list ---------- */

@media (max-width: 767px) {
  /* State and Type fill the first row. The search box shares the second with "Near me" and, while it is
     shown, "Clear all"; on the narrowest phones "Clear all" drops to a row of its own. */
  .bdpm .bdpm-toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .bdpm .bdpm-field {
    flex: 1 1 calc(50% - 5px);
    max-width: none;
  }

  .bdpm .bdpm-field-search {
    flex: 1 1 120px;
  }

  .bdpm .bdpm-btn-near {
    padding: 0 12px;
  }

  .bdpm .bdpm-btn-quiet {
    margin: 0 0 0 auto;
  }

  /* 16 px keeps phones from zooming the page when a field gets focus. */
  .bdpm .bdpm-field select,
  .bdpm .bdpm-field input {
    font-size: 16px;
  }

  /* The summary has a row of its own, with room for one line before the text is there, so nothing below it
     moves when the data arrives. */
  .bdpm .bdpm-summary {
    flex: 1 1 100%;
    min-height: 1.45em;
  }

  .bdpm .bdpm-chip,
  .bdpm .bdpm-share {
    height: 40px;
  }

  /* "Copy link" stands at the right end of the legend's row. Hidden, it keeps its box there as at every width
     (see above), and its width is that of its longer text. */
  .bdpm .bdpm-share {
    order: 1;
    justify-content: flex-end;
    margin: 0 0 0 auto;
  }

  .bdpm .bdpm-legend {
    flex: 1 1 150px;
    margin: 0;
  }

  .bdpm .bdpm-tabs {
    display: flex;
  }

  .bdpm .bdpm-body {
    display: block;
    height: auto;
  }

  .bdpm .bdpm-list,
  .bdpm .bdpm-mapwrap {
    height: clamp(360px, 62vh, 520px);
    border-right: 0;
  }

  .bdpm[data-view="map"] .bdpm-list,
  .bdpm[data-view="list"] .bdpm-mapwrap {
    display: none;
  }

  /* Focused, "Skip the list" is as high as the other controls of a phone. */
  .bdpm .bdpm-skip:focus {
    height: 40px;
    margin: 0 0 -40px;
  }

  .bdpm .maplibregl-ctrl-group button {
    width: 40px;
    height: 40px;
  }

  .bdpm .bdpm-states th,
  .bdpm .bdpm-states td {
    padding: 6px 8px;
  }
}

/* ---------- near mode on a phone: the chip and "Copy link" share a row, the legend takes the next one ----------
   Up to 479 px the three do not fit side by side. Without this the chip would stand beside a legend of two
   lines and "Copy link" alone on a third row. */

@media (max-width: 479px) {
  .bdpm .bdpm-chip:not([hidden]) ~ .bdpm-legend {
    order: 2;
    flex-basis: 100%;
  }
}

/* ---------- the narrowest phones: the four columns of the table fit only with smaller type and gaps ---------- */

@media (max-width: 359px) {
  .bdpm .bdpm-states table {
    font-size: 12px;
  }

  .bdpm .bdpm-states th,
  .bdpm .bdpm-states td {
    padding: 6px 4px;
  }

  .bdpm .bdpm-states th:first-child {
    padding-left: 6px;
  }

  .bdpm .bdpm-states th:last-child,
  .bdpm .bdpm-states td:last-child {
    padding-right: 6px;
  }
}

/* ---------- up to 337 px the summary of the start view takes two lines: room for both from the start ---------- */

@media (max-width: 337px) {
  .bdpm .bdpm-summary {
    min-height: 2.9em;
  }
}

/* ---------- Windows contrast themes (forced colours) ----------
   The browser replaces background colours and drops shadows there. What was drawn with them is drawn again
   with the colours of the visitor's theme: the cross of the card's Close button, the selected tab, the row
   of the open place, and on dark themes the two icons that are dark drawings. */

@media (forced-colors: active) {
  .bdpm .bdpm-card-close::before,
  .bdpm .bdpm-card-close::after {
    background: ButtonText;
    forced-color-adjust: none;
  }

  .bdpm .bdpm-tab[aria-selected="true"] {
    border-color: Highlight;
    background-color: Highlight;
    color: HighlightText;
    forced-color-adjust: none;
  }

  .bdpm .bdpm-row[aria-current="true"] {
    padding-left: 8px;
    border-left: 4px solid Highlight;
  }
}

@media (forced-colors: active) and (prefers-color-scheme: dark) {
  .bdpm .bdpm-btn-near::before {
    filter: invert(1);
  }

  .bdpm .bdpm-reset .maplibregl-ctrl-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M2.5 8.6L9 2.8l6.5 5.8M4.6 7.4v7.4h8.8V7.4' fill='none' stroke='%23fff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}
