/* Режим «Маршрут» на веб-карте (site/js/route-*.js): кнопка входа, панель
   режима, слой на карте и блоки карточки ответа по маршруту. Цвета только
   токенами base.css. */

.route-icon { display: grid; place-items: center; }
.route-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

/* Широкий экран: квадратная кнопка в колонке над «центром карты» и масштабом,
   того же размера и радиуса, только значок (Семён 17.11.2026: «кнопка маршрута
   как-то плоховато отображена»); название в aria-label и title. Отступ между
   кнопками колонки один, как от «центра карты» до масштаба: 13 px (bottom
   «центра карты» 114 + 38 + 13; замер 1440 × 900). */
#btn-route { bottom: 165px; }
#btn-route .route-button-label,
#mobile-route .route-button-label { display: none; }
.route-toggle.is-active,
.route-toggle.is-active:hover {
  border-color: var(--action-bg);
  background: var(--action-bg);
  color: var(--action-ink);
}

#route-bar {
  position: absolute;
  z-index: 1000;
  bottom: 30px;
  left: 50%;
  display: flex;
  max-width: calc(100% - 140px);
  align-items: center;
  gap: 6px;
  padding: 6px 6px 6px 12px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-button);
}
#route-bar[hidden] { display: none; }
.route-bar-info { display: grid; min-width: 0; margin-right: 6px; }
.route-bar-message { color: var(--ink-soft); font-size: 12px; font-weight: 650; line-height: 1.3; }
.route-bar-info[hidden] { display: none; }
.route-bar-button {
  display: flex;
  min-height: 34px;
  flex: none;
  align-items: center;
  gap: 5px;
  padding: 0 10px 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
}
.route-bar-button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.route-bar-button:disabled { cursor: default; opacity: .45; }
.route-bar-button .route-icon svg { width: 17px; height: 17px; }
.route-bar-done,
.route-bar-done:hover:not(:disabled) { border-color: var(--action-bg); background: var(--action-bg); color: var(--action-ink); }

/* Слой на карте. Вершина: видимый кружок 26 px в зоне касания 36 px. */
.route-vertex { display: grid; place-items: center; cursor: grab; }
.route-vertex span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 2px solid var(--brand);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-button);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}
.leaflet-dragging .route-vertex { cursor: grabbing; }
.route-label span {
  position: absolute;
  padding: 2px 6px;
  /* Сбоку от отрезка на --dx/--dy (route-layer.js), кружки вершин её не закрывают. */
  transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -30px)));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
}
#map path.route-line { stroke: var(--brand); }
#map path.route-halo { stroke: var(--surface); }
#map path.route-hidden { stroke: var(--surface); }
.route-vertex.is-fixed { cursor: default; }
.route-bar-button[hidden] { display: none; }

/* Карточка ответа по маршруту. */
.v-route-length { margin-bottom: 4px; color: var(--ink); font-size: 13px; font-weight: 700; }
.v-zone-route { margin-top: 3px; color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.v-route-vertices { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.v-route-vertex { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; }
.v-route-leg { color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.v-route-profile { margin-top: 9px; border-top: 1px solid var(--line); }
.v-route-profile-summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  list-style: none;
}
.v-route-profile-summary::-webkit-details-marker { display: none; }
.v-route-profile-summary::after {
  width: 7px;
  height: 7px;
  flex: none;
  margin: -4px 4px 0 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
}
.v-route-profile[open] > .v-route-profile-summary::after { margin-top: 4px; transform: rotate(225deg); }
.v-profile { display: grid; gap: 6px; padding-bottom: 10px; }
.v-profile > .v-fact-value { color: var(--ink); font-size: 13px; font-weight: 700; }
.v-profile-chart { position: relative; height: 96px; margin-bottom: 16px; }
.v-profile-svg { display: block; width: 100%; height: 96px; overflow: visible; }
.v-profile-area { fill: var(--tint-strong); stroke: none; }
.v-profile-line { fill: none; stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; }
.v-profile-vertex { stroke: var(--line-strong); stroke-dasharray: 3 3; stroke-width: 1; vector-effect: non-scaling-stroke; }
.v-profile-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--brand);
}
.v-profile-dot.is-min { background: var(--ink-soft); }
.v-profile-axis { position: absolute; right: 0; bottom: -16px; left: 0; height: 14px; }
.v-profile-number {
  position: absolute;
  transform: translateX(-50%);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 700;
}
.v-profile-range { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink-soft); font-size: 12px; font-weight: 650; }

@media (max-width: 760px) {
  #mobile-route { bottom: calc(140px + env(safe-area-inset-bottom)); }
  /* Над листом ответа рядом с «центром карты», слева от него (mobile.css). */
  html[data-sheet="compact"] #mobile-route,
  html[data-sheet="medium"] #mobile-route { right: 72px; bottom: calc(var(--sheet-reach) + 10px); }
  #mobile-route .route-icon svg { width: 23px; height: 23px; }
  #mobile-route.is-active { border-color: var(--action-bg); background: var(--action-bg); color: var(--action-ink); }
  #route-bar {
    position: fixed;
    top: calc(118px + env(safe-area-inset-top));
    right: 12px;
    bottom: auto;
    left: auto;
    max-width: calc(100% - 24px);
    transform: none;
    padding: 6px 6px 6px 10px;
  }
  .route-bar-info { flex: 1; }
  .route-bar-button { min-width: 40px; min-height: 40px; justify-content: center; padding: 0 8px; }
  .route-bar-button:not(.route-bar-done) .route-button-label { display: none; }
}

/* Видимость дрона с места взлёта (site/js/route-sight-view.js): поле высоты с
   быстрыми значениями, линия дрона на профиле, закрытые участки янтарной
   полосой (подсказка, не статус ответа). */
.v-sight-flight { display: grid; gap: 6px; }
.v-sight-label { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.v-sight-input {
  width: 76px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.v-sight-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.v-sight-chip {
  min-width: 52px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.v-sight-chip[aria-pressed="true"] { border-color: var(--brand); background: var(--accent-bg-soft); color: var(--accent-ink); }
.v-sight-lines { display: grid; gap: 3px; color: var(--ink); font-size: 12.5px; font-weight: 650; line-height: 1.35; }
.v-sight-line:first-child { font-weight: 750; }
.v-sight-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-soft); font-size: 11.5px; font-weight: 650; }
.v-sight-key { display: inline-flex; align-items: center; gap: 6px; }
.v-sight-key::before { width: 16px; height: 0; border-top: 2px dashed var(--ink); content: ""; }
.v-sight-key.is-hidden::before { height: 10px; border: 0; background: var(--status-warn-bg); box-shadow: inset 0 0 0 1px var(--marker-part); }
.v-sight-band { fill: var(--status-warn-bg); }
.v-sight-drone { stroke: var(--ink); stroke-dasharray: 5 4; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.v-sight-drone.is-hidden { stroke: var(--marker-part); stroke-dasharray: none; stroke-width: 3; }
