/* The two views of the top page and their conditions (dist/explore.js, tools/build_home.py).
   Colours are the variables at the top of style.css. */
.explore-views {
  margin: 16px 0 12px;
}
/* One segmented control, like the List / Tree switch of the record pages' toolbar. */
.explore-views {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.explore-views button {
  margin: 0;
  border: 0;
  border-radius: 0;
}
.explore-views button + button {
  border-inline-start: 1px solid var(--line);
}
.explore-views button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--c-ffffff);
}
.explore-filter {
  margin: 0 0 16px;
}
/* The switch and the conditions are in the page from the start, so they are drawn with
   it; they work only with scripts, so without them only the list is shown. */
@media (scripting: none) {
  .explore-views,
  .explore-filter {
    display: none;
  }
}
.explore-view .continent h3 {
  margin-top: 18px;
}
/* The map's frame, points and key are the record maps' (record.css); this box only holds
   the map for the map view. */
.wm-map {
  position: relative;
}
.wm-hint {
  position: absolute;
  inset-inline-start: 10px;
  bottom: 6px;
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
  max-width: 60%;
}
.wm-legend {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--c-fafbf6);
}
.wm-count {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
}
.wm-legend section + section {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 10px;
}
.wm-legend h2 {
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 6px;
}
.wm-legend .wm-selectall {
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.wm-legend ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.wm-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--c-eef0e9);
}
.wm-legend label {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
  padding: 7px 0;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}
.wm-legend label span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.wm-legend label small {
  color: var(--muted);
  font-size: 11px;
}
.wm-legend input {
  accent-color: var(--teal);
  margin: 0;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.wm-ring {
  border: 2px solid var(--muted);
}
@media (max-width: 700px) {
  .wm-hint {
    display: none;
  }
  .wm-legend label,
  .wm-legend li {
    min-height: 44px;
  }
}
.wm-legend select {
  font-size: 13px;
  padding: 8px 6px;
  min-height: 40px;
  background: var(--c-ffffff);
}
.wm-legend .wm-colour {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 6px;
  padding: 0;
  cursor: default;
}
#points circle.wm-nodata {
  opacity: 0.55;
}
.wm-conds-title {
  font-size: 13px;
  margin: 16px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.wm-empty {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
}
.wm-cond {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--c-ffffff);
}
.wm-cond.wm-or {
  border-start-start-radius: 0;
  border-start-end-radius: 0;
  border-top-style: dashed;
}
.wm-cond.wm-or-next {
  border-end-start-radius: 0;
  border-end-end-radius: 0;
  border-bottom-style: dashed;
}
.wm-cond-head {
  display: flex;
  gap: 6px;
  align-items: center;
}
.wm-cond-head select {
  flex: 1;
  min-width: 0;
}
.wm-remove {
  border: 0;
  font-size: 18px;
  line-height: 1;
  padding: 6px 9px;
  min-height: 36px;
}
.wm-join {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 6px 0;
}
.wm-join button {
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 0;
  min-height: 32px;
}
.wm-join button {
  border-radius: 0;
}
.wm-join button:first-child {
  border-start-start-radius: 5px;
  border-end-start-radius: 5px;
}
.wm-join button:last-child {
  border-start-end-radius: 5px;
  border-end-end-radius: 5px;
  border-inline-start: 0;
}
.wm-join button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--c-ffffff);
}
.wm-add {
  width: 100%;
  margin-top: 10px;
  font-size: 13px;
  min-height: 40px;
  border-style: dashed;
}
.wm-cond .wm-selectall {
  margin-top: 6px;
}
/* NOT next to a condition's feature menu: pressed, the condition leaves out what it matches
   (dist/explore.js condBox). Drawn like the AND / OR buttons. */
.wm-not {
  font-size: 11px;
  padding: 5px 9px;
  min-height: 36px;
}
.wm-not[aria-pressed='true'] {
  background: var(--ink);
  color: var(--c-ffffff);
}
/* Minimum and Maximum of a number condition, the chosen language of a relative one, the
   text of the Name condition and the minimum number of conditions (dist/explore.js). */
.wm-range {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.wm-legend .wm-range label,
.wm-legend .wm-language,
.wm-legend .wm-min {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: default;
}
.wm-legend .wm-range label {
  flex: 1 1 120px;
}
.wm-legend .wm-language,
.wm-legend .wm-min {
  margin-top: 6px;
}
.wm-legend .wm-min[hidden] {
  display: none;
}
.wm-legend input[type='number'],
.wm-legend input[type='search'] {
  appearance: none;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  min-height: 40px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--c-ffffff);
  color: inherit;
  /* 16px keeps iOS Safari from zooming into the box. */
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  accent-color: auto;
}
.wm-legend .wm-find {
  margin-top: 6px;
}
/* A long list of values scrolls inside the condition. */
.wm-legend ul.wm-long {
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.wm-legend li[hidden] {
  display: none;
}
/* Map view: the map and its record box fill the window (record.css .lmap-full; relative above would win). */
.wm-map.lmap-full {
  position: fixed;
  top: 0;
  z-index: 1000;
  border: 0;
  border-radius: 0;
}
.lmap-full .wm-hint {
  display: none;
}
