/* Страница карты — надстройка над общими стилями сайта.
   Этот файл кладётся поверх index.css, который генерит uNmINeD: их версия
   растягивает html и body на 100% и ставит системный шрифт, а у нас на
   странице есть шапка и подвал, и типографика общая с остальным сайтом. */

.map-head { padding-top: 44px; }
.map-head .section-head { margin-bottom: 18px; }

.map-lead {
  font-size: 16px;
  line-height: 1.55;
  color: var(--body);
  max-width: 620px;
  margin: 0 0 26px;
  text-wrap: pretty;
}

/* Карта во всю ширину экрана: полей у неё нет, зато есть рамка-подложка,
   которая держит её в одном ряду с панелями остального сайта. */
.map-shell {
  border-top: 2px solid var(--line-2);
  border-bottom: 2px solid var(--line-2);
  background: var(--bg);
}

.map-canvas {
  /* 84px шапка + 250px на заголовок, подсказки и воздух */
  height: clamp(420px, calc(100vh - 334px), 900px);
  width: 100%;
  /* тайлы — пиксельная графика, сглаживание превращает их в кашу */
  image-rendering: pixelated;
  background: var(--bg);
}

.map-hints {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding-top: 34px;
  padding-bottom: 60px;
}
.map-hint__title {
  font-family: Unbounded, Onest, sans-serif;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}
.map-hint__text { font-size: 14px; line-height: 1.5; color: var(--body); text-wrap: pretty; }

/* ── Управление OpenLayers в палитре сайта ────────────────────────────────
   Библиотека рисует круглые синие кнопки — на тёмной странице они выглядят
   чужеродно, поэтому перекрашиваем их в квадратные панели с зелёным акцентом. */

.ol-control {
  background: transparent;
  padding: 0;
  margin: 12px;
}
.ol-control button {
  font-family: Onest, system-ui, sans-serif;
  font-weight: 700;
  font-size: 17px;
  width: 34px;
  height: 34px;
  margin: 2px 0 0;
  border: 2px solid var(--line-3);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.ol-control button:hover,
.ol-control button:focus {
  background: var(--panel-2);
  border-color: var(--green);
  color: var(--green);
  outline: none;
}

.ol-attribution { display: none; }

/* Координаты под курсором. */
div.ol-mouse-position {
  top: auto;
  bottom: 12px;
  right: 12px;
  padding: 8px 12px;
  border: 2px solid var(--line-3);
  border-radius: 0;
  background: rgba(11, 16, 20, .9);
  box-shadow: none;
  font-family: Unbounded, Onest, sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--text);
}
.mouseposition { background: transparent; padding: 0; text-align: right; }
.mousepositioncoord { min-width: 46px; display: inline-block; color: var(--green); }

/* Линейка масштаба. */
.ol-scale-step-text {
  font-family: Onest, system-ui, sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: var(--text);
  text-shadow: 1px 0 0 var(--bg), 0 1px 0 var(--bg), -1px 0 0 var(--bg), 0 -1px 0 var(--bg);
}
.ol-scale-singlebar-odd { background: var(--line-3); }
.ol-scale-singlebar-even { background: var(--green); }
.ol-scale-line, .ol-scale-bar { background: transparent; }

/* Контекстное меню по правой кнопке. */
.ol-ctx-menu-container {
  font-family: Onest, system-ui, sans-serif;
  font-size: 14px;
  border: 2px solid var(--line-3);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .9);
}
.ol-ctx-menu-container li { padding: 8px 14px 8px 30px; }
.ol-ctx-menu-container li:hover { background: var(--panel-2); color: var(--green); }
.ol-ctx-menu-separator { border-color: var(--line-2); }
.menuitem-checked::before { content: '☑'; width: 20px; display: inline-block; margin-left: -20px; }
.menuitem-unchecked::before { content: '☐'; width: 20px; display: inline-block; margin-left: -20px; }

/* Всплывающее «скопировано» от Toastify. */
.toastify {
  font-family: Onest, system-ui, sans-serif;
  font-weight: 700;
  border-radius: 0;
  background: var(--green);
  color: var(--on-green);
  box-shadow: 0 12px 28px -10px rgba(61, 214, 140, .75);
}

@media (max-width: 820px) {
  .map-head { padding-top: 30px; }
  .map-canvas { height: clamp(360px, calc(100vh - 300px), 700px); }
  .map-hints { padding-top: 26px; padding-bottom: 44px; }
}
