/* The climb tool and its page (/<lang>/map/elevation/), loaded there only,
   after the site's own stylesheet, whose colours (`--navy`, `--gold`, …)
   and map page layout it builds on. */

/* The climb tool's button, drawn like the zoom's, stays dark while it
   measures. */
.map-climb-button svg {
  display: block;
  width: 18px;
  height: 18px;
  margin: auto;
  color: var(--navy);
}

.maplibregl-ctrl.maplibregl-ctrl-group button.map-climb-button[aria-pressed="true"] {
  background: var(--navy);
}

.maplibregl-ctrl.maplibregl-ctrl-group button.map-climb-button[aria-pressed="true"] svg {
  color: #fff;
}

/* What the climb tool found: the words and the ground's profile, and beside
   them a building as many floors high. On a phone it sits under the map, in
   the page's flow, so the map stays in sight; on a wide screen, over the
   bottom of the map. */
.map-climb {
  position: relative;
  margin-top: 12px;
  box-sizing: border-box;
  padding: 12px 36px 12px 14px;
  border-radius: 14px;
  background: rgb(255 255 255 / 96%);
  color: var(--navy);
  font-size: 0.8125rem;
  line-height: 1.45;
  box-shadow: 0 1px 6px rgb(0 0 0 / 18%);
}

.map-climb[hidden] {
  display: none;
}

.map-climb p {
  margin: 0 0 4px;
}

.map-climb-example {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.map-climb-main {
  font-size: 0.9375rem;
  font-weight: 700;
}

.map-climb-close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: none;
  color: var(--navy);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

@media (min-width: 900px) {
  .map-climb {
    position: absolute;
    bottom: 40px;
    left: 10px;
    z-index: 2;
    width: min(420px, calc(100% - 20px));
    margin-top: 0;
  }

  [dir="rtl"] .map-climb {
    right: 10px;
    left: auto;
  }
}

[dir="rtl"] .map-climb {
  padding: 12px 14px 12px 36px;
}

[dir="rtl"] .map-climb-close {
  right: auto;
  left: 8px;
}

.map-climb-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 12px;
  align-items: end;
}

/* Pointed along by mouse or finger, which then stays on it. */
.map-climb-profile {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 6px;
  cursor: crosshair;
  touch-action: none;
}

.map-climb-marker {
  stroke: var(--navy);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.map-climb .map-climb-at {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
}

.map-climb-slope {
  fill: rgb(176 138 79 / 25%);
}

.map-climb-line {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.map-climb-building {
  display: block;
  width: 64px;
  height: 140px;
}

/* A floor's colour comes from the building (building.mjs). */
.map-climb-floor {
  stroke: var(--navy);
  stroke-width: 0.6;
}

.map-climb-skyscraper {
  stroke-width: 0.3;
}

.map-climb-balcony {
  fill: #f6f3ee;
  stroke: var(--navy);
  stroke-width: 0.5;
}

/* A panel block's seams, a band at each floor of the others. */
.map-climb-seam {
  fill: none;
  stroke: rgb(0 0 0 / 18%);
  stroke-width: 0.5;
}

/* A block's glazed loggias. */
.map-climb-loggia {
  fill: #c3d3e0;
  stroke: #f6f3ee;
  stroke-width: 0.8;
}

/* A skyscraper's mullions and the sky caught in its glass. */
.map-climb-mullions {
  fill: none;
  stroke: rgb(255 255 255 / 45%);
  stroke-width: 0.5;
}

.map-climb-sheen {
  fill: rgb(255 255 255 / 22%);
}

/* A tower's glass crown. */
.map-climb-crown {
  fill: #a9bfd2;
  stroke: var(--navy);
  stroke-width: 0.5;
}

.map-climb-roof-side {
  fill: #8f3f2e;
}

.map-climb-carving {
  fill: none;
  stroke: #5e3a22;
  stroke-width: 0.7;
}

.map-climb-loggia-glass {
  fill: #9fb9cf;
}

/* A canopy over an entrance, air conditioners on a wall. */
.map-climb-canopy {
  fill: #6b7079;
}

.map-climb-unit {
  fill: #eceae4;
  stroke: rgb(0 0 0 / 25%);
  stroke-width: 0.3;
}

/* The earth a building hangs into for a drop. */
.map-climb-under {
  fill: rgb(156 128 92 / 18%);
}

/* A Tbilisi house's carved wooden balcony. */
.map-climb-wood {
  fill: #8a5a3a;
}

/* The well-known structures (silhouettes.mjs). */
.map-climb-iron {
  fill: #7a6450;
}

.map-climb-stone {
  fill: #b9ad99;
}

.map-climb-copper {
  fill: #6fa597;
}

.map-climb-flame {
  fill: #e0a43b;
}

.map-climb-flame-light {
  fill: #f6d77a;
}

.map-climb-torch-rail {
  fill: none;
  stroke: #568a7d;
  stroke-width: 0.45;
}

.map-climb-travertine {
  fill: #d9b48e;
}

.map-climb-brick {
  fill: #b07a5a;
}

.map-climb-brick-grey {
  fill: #d3d1cb;
}

.map-climb-glass {
  fill: #7d8590;
}

.map-climb-sky {
  fill: #d6e2ea;
}

.map-climb-sandstone {
  fill: #cfae7c;
}

.map-climb-sandstone-dark {
  fill: #a1835c;
}

.map-climb-roof-lead {
  fill: #9a8e80;
}

.map-climb-relief {
  fill: #d3c8b0;
  stroke: #8f8471;
  stroke-width: 0.45;
  stroke-linejoin: round;
}

.map-climb-limestone {
  fill: #e8dfcb;
}

.map-climb-stone-dark {
  fill: #9a8f7d;
}

.map-climb-marble {
  fill: #f3efe6;
  stroke: #8f8678;
  stroke-width: 0.8;
}

.map-climb-sand {
  fill: #d8bd84;
}

.map-climb-sand-dark {
  fill: #bfa26a;
}

.map-climb-dark {
  fill: #5b5147;
}

.map-climb-gold {
  fill: #d6a93f;
}

.map-climb-slate {
  fill: #4f5560;
}

.map-climb-steel {
  fill: #b8bfc6;
}

.map-climb-steel-crown {
  fill: #dde1e5;
  stroke: #8d959c;
  stroke-width: 0.45;
}

.map-climb-silver {
  fill: #dfe3e7;
  stroke: #8d959c;
  stroke-width: 0.8;
}

.map-climb-lines {
  fill: none;
  stroke: #6f665c;
  stroke-width: 0.8;
}

.map-climb-lines-light {
  fill: none;
  stroke: #a88f5c;
  stroke-width: 0.8;
}

.map-climb-lattice-fine {
  fill: none;
  stroke: #a39079;
  stroke-width: 0.55;
}

.map-climb-rows {
  fill: none;
  stroke: #6f7782;
  stroke-width: 0.8;
  stroke-dasharray: 1.5 0.8;
}

.map-climb-folds {
  fill: none;
  stroke: #4f8073;
  stroke-width: 0.6;
}

.map-climb-courses {
  fill: none;
  stroke: #8f7350;
  stroke-width: 0.35;
}

.map-climb-ribs {
  fill: none;
  stroke: #6d7881;
  stroke-width: 0.9;
}

.map-climb-hips {
  fill: none;
  stroke: #d6a93f;
  stroke-width: 0.5;
}

.map-climb-ring {
  fill: none;
  stroke: #3d3a36;
  stroke-width: 0.7;
}

.map-climb-copper-light {
  fill: #93c0b3;
}

.map-climb-copper-dark {
  fill: #568a7d;
}

.map-climb-white {
  fill: #f6f3ee;
}

.map-climb-outline {
  fill: none;
  stroke: #8a3a30;
  stroke-width: 0.8;
}

/* The side of a structure away from the light. */
.map-climb-shade {
  fill: rgb(0 0 0 / 16%);
}

.map-climb-window {
  fill: #9fb4cc;
}

.map-climb-roof {
  fill: #b5523b;
}

.map-climb-door {
  fill: var(--navy);
}

.map-climb-spire,
.map-climb-ground {
  stroke: var(--navy);
  stroke-width: 2;
}

/* The climb tool's page: the rest of its introduction, its example walks,
   and its answers. */
.elevation-intro .article-breadcrumbs {
  margin-bottom: 8px;
}

/* The trail stops at the map: the page's own name is its heading. */
.elevation-intro .article-breadcrumbs li[aria-current] {
  display: none;
}

.elevation-intro .article-breadcrumbs li:nth-last-child(2)::after {
  content: none;
}

.elevation-faq {
  margin-top: 24px;
}

.elevation-more {
  margin: 0 0 20px;
  color: #4a525d;
  line-height: 1.5;
}

.elevation-faq h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 1.25rem;
}

.elevation-examples {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A walk: where from and to, its climb or drop large, and its length, each
   on its line; the whole of it measures the walk on the map. */
.elevation-show {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.elevation-show:hover:not(:disabled) {
  border-color: rgb(185 154 106 / 60%);
  box-shadow: 0 3px 10px rgb(120 90 40 / 10%);
}

.elevation-show:disabled {
  cursor: default;
}

.elevation-walk {
  flex-basis: 100%;
  font-size: 0.9375rem;
  font-weight: 600;
}

.elevation-told {
  font-size: 1.0625rem;
  font-weight: 700;
}

.elevation-told::before {
  margin-inline-end: 4px;
  color: var(--gold);
}

.elevation-up::before {
  content: "↑";
}

.elevation-down::before {
  content: "↓";
}

.elevation-length {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.8125rem;
}

.elevation-examples + h2 {
  margin-top: 24px;
}

/* A question, its answer opening under it. */
.elevation-answer {
  border-bottom: 1px solid var(--line);
}

.elevation-answer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}

.elevation-answer summary::-webkit-details-marker {
  display: none;
}

.elevation-answer summary::after {
  content: "+";
  flex: none;
  color: var(--gold);
  font-size: 1.25rem;
  line-height: 1;
}

.elevation-answer[open] summary::after {
  content: "−";
}

.elevation-answer h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
}

.elevation-answer p {
  margin: 0 0 14px;
  color: #4a525d;
  line-height: 1.5;
}

.elevation-answer a {
  color: inherit;
}

/* On a computer the answers take the column the map page gives its places. */
@media (min-width: 900px) {
  .elevation-faq {
    grid-row: 3;
    grid-column: 1;
    min-height: 0;
    margin: 0;
    padding: 14px 24px 16px;
    overflow-y: auto;
  }
}

/* The search for where one will stay, under the introduction: the box and
   its button on one line, what was found under them, and whose data it is. */
.elevation-search {
  margin-top: 14px;
}

.elevation-search label {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
  font-weight: 700;
}

.elevation-search-row {
  display: flex;
  gap: 8px;
}

.elevation-search input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  box-sizing: border-box;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.elevation-search input:focus-visible {
  border-color: var(--gold);
  outline: none;
}

.elevation-search .button {
  flex: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.elevation-search .button:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* A line kept for what was found, so the map below does not move when it
   is said. */
.elevation-search-status {
  min-height: 1.5em;
  margin: 6px 0 0;
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.5;
}

.elevation-search input:disabled {
  background: var(--bg);
}

.elevation-search-credit {
  margin: 4px 0 0;
  font-size: 0.75rem;
}

.elevation-search-credit a {
  color: var(--muted);
}
