/* Контейнер поиска поверх карты — в левом верхнем углу */
#map-search {
  position: absolute;
  top: 10px;        /* от верха */
  left: 80px;       /* минимальный отступ от левого бара */
  transform: none;  /* убираем центрирование */
  z-index: 2700;

  width: 360px;
  max-width: 94vw;
  padding: 8px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.88),
    rgba(0, 0, 0, 0.62)
  );
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Строка ввода + кнопка */
#map-search-form {
  display: flex;
  align-items: center;
  gap: 8px;

  width: 100%;
  height: 40px; /* единая высота */
  margin-top: 1px;   /* опускаем ряд на 1px вниз */
}

/* Поле ввода */
#map-search-input {
  flex: 1;
  height: 100%;
  padding: 0 12px;

  font-size: 14px;
  line-height: 40px;
  margin-top: 1px;   /* опускаем ряд на 1px вниз */

  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(10, 10, 10, 0.94);

  color: #f5f5f5;
  outline: none;
  box-shadow: none;

  transition: background 0.12s ease, border-color 0.12s ease;
}

#map-search-input::placeholder {
  color: rgba(230, 230, 230, 0.42);
}

#map-search-input:focus {
  background: rgba(12, 12, 12, 0.98);
  border-color: rgba(255, 255, 255, 0.18);
}

/* Кнопка "НАЙТИ" */
#map-search-button {
  height: 100%;
  padding: 0 16px;

  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;

  border-radius: 10px; /* как у поля */
  border: 1px solid rgba(255, 255, 255, 0.14);

  background: rgba(16, 16, 16, 0.96);
  color: #f5f5f5;
  cursor: pointer;

  box-shadow: 0 0 12px rgba(0, 0, 0, 0.9);
  transition:
    background 0.12s ease,
    transform 0.08s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
}

#map-search-button:hover {
  background: rgba(22, 22, 22, 0.98);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 16px rgba(0, 0, 0, 1);
  transform: translateY(-1px);
}

#map-search-button:active {
  transform: translateY(0);
  box-shadow: 0 0 10px rgba(0, 0, 0, 1);
}

/* Блок с результатами */
#map-search-results {
  width: 100%;
}

/* Список результатов — сразу под формой, с минимальным отступом */
#map-search-results-list {
  max-height: 260px;
  overflow-y: auto;

  margin: 4px 0 0 0;  /* только маленький отступ сверху */
  padding: 4px;
  list-style: none;

  background: rgba(4, 4, 4, 0.92);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);

  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);

  font-size: 13px;
  color: #f3f3f3;
}

/* Элементы результата */
.map-search-item {
  padding: 7px 9px;
  border-radius: 7px;
  cursor: pointer;

  display: flex;
  align-items: center;
  gap: 6px;

  transition: background 0.12s ease, transform 0.08s ease;
}

.map-search-item + .map-search-item {
  margin-top: 2px;
}

.map-search-item:hover {
  background: radial-gradient(circle at 0% 0%, rgba(0, 180, 255, 0.32), rgba(255, 255, 255, 0.02));
  transform: translateX(1px);
}

.map-search-item.active {
  background: radial-gradient(circle at 0% 0%, rgba(0, 200, 255, 0.55), rgba(0, 0, 0, 0.9));
}

/* Скрытый список */
#map-search-results-list.hidden {
  display: none;
}

/* WebKit-браузеры (Chrome, Edge, Opera, Safari) */
#map-search-results-list::-webkit-scrollbar {
  width: 6px;
}

#map-search-results-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.7);
  border-radius: 999px;
}

#map-search-results-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff2d55, #0a84ff);
  border-radius: 999px;
  box-shadow: 0 0 6px rgba(255, 45, 85, 0.8);
}

#map-search-results-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff375f, #0a84ff);
}

/* Firefox */
#map-search-results-list {
  scrollbar-width: thin;
  scrollbar-color: #ff2d55 rgba(0, 0, 0, 0.7);
}