body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

/* ── Map ───────────────────────── */
#map-wrap {
  flex: 1;
  position: relative;
}
#map {
  height: 100%;
}

/* ── Popup ──────────────────────── */
.maplibregl-popup-content {
  background: #1a1a1a !important;
  color: #ddd;
  border: 1px solid #333;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  padding: 10px 14px;
  font-size: 0.8rem;
  line-height: 1.8;
}
.maplibregl-popup-content strong {
  color: #fff;
}
.maplibregl-popup-tip {
  border-top-color: #1a1a1a !important;
}
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: #1a1a1a !important;
}
.maplibregl-popup-anchor-top .maplibregl-popup-tip {
  border-bottom-color: #1a1a1a !important;
}
.maplibregl-popup-close-button {
  color: #888;
  font-size: 18px;
}
.popup-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.popup-row svg {
  width: 13px;
  height: 13px;
  opacity: 0.5;
  flex-shrink: 0;
}

/* ── Search ─────────────────────── */
#search-container {
  position: relative;
  flex: 1;
  max-width: 480px;
}
#search-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid #333;
  border-radius: 6px;
  background: rgba(15, 15, 15, 0.92);
  min-height: 28px;
  cursor: text;
}
#search-wrap:focus-within {
  border-color: var(--accent);
}
#search-input {
  border: none;
  background: transparent;
  color: #e6edf3;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  flex: 1;
  min-width: 100px;
}
#search-input::placeholder {
  color: #555;
}
#search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
}
.search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  border-bottom: 1px solid #222;
}
.search-item:last-child {
  border-bottom: none;
}
.search-item:hover,
.search-item.active {
  background: rgba(255, 255, 255, 0.05);
}
.search-name {
  color: #e6edf3;
  font-weight: 500;
}

@media (max-width: 599px) {
  #search-container {
    max-width: none;
  }
}
