/* =========================================
   GLOBAL
========================================= */
html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* =========================================
   TOP STRIP FILTER BAR
========================================= */
.hg-topstrip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(40, 40, 40, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 10000;
}

.hg-topstrip-inner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  box-sizing: border-box;
  flex-wrap: wrap; /* allows clean wrapping on smaller widths */
}

.hg-top-title {
  font-weight: 900;
  font-size: 14px;
  color: white;
  white-space: nowrap;
}

.hg-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 13px;
}

.hg-filter label {
  font-weight: 900;
  opacity: 0.95;
  white-space: nowrap;
}

.hg-filter select {
  padding: 5px 10px;
  border-radius: 8px;
  border: none;
  font-weight: 800;
}

.hg-checkgroup {
  gap: 12px;
}

.hg-checkgroup label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 800;
}

.hg-search input {
  width: 220px;
  max-width: 38vw;
  padding: 6px 10px;
  border-radius: 10px;
  border: none;
  font-weight: 800;
  outline: none;
}

.hg-btn {
  border: 0;
  border-radius: 10px;
  padding: 7px 10px;
  font-weight: 900;
  cursor: pointer;
  background: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,255,255,0.18);
}

.hg-btn:active {
  transform: translateY(1px);
}

.hg-count {
  font-weight: 900;
  opacity: 0.9;
  min-width: 44px; /* keeps layout stable */
  text-align: left;
}

/* =========================================
   MAP
========================================= */
#map {
  position: absolute;
  top: 62px;   /* desktop-ish default */
  bottom: 0;
  left: 0;
  right: 0;
}

/* =========================================
   LEAFLET CONTROLS
========================================= */
.leaflet-control-layers,
.leaflet-bar a {
  border-radius: 10px !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

/* =========================================
   MARKERS
========================================= */
.marker {
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: rgba(255,255,255,0.96);
  border: 3px solid #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.marker.buyer { border-color: #2e7d32; }
.marker.seller { border-color: #1565c0; }
.marker.unknown { border-color: #6d6d6d; }

.leaflet-div-icon {
  background: transparent !important;
  border: none !important;
}

/* =========================================
   MOBILE TWEAKS
========================================= */
@media (max-width: 700px) {
  /* Hide title to save space */
  .hg-top-title {
    display: none;
  }

  /* Make the bar feel tight */
  .hg-topstrip-inner {
    gap: 10px;
    padding: 10px 12px;
  }

  /* Put search below property types and make it full width */
  .hg-search {
    width: 100%;
    flex-basis: 100%;
    order: 10;
  }

  .hg-search input {
    width: 100%;
    max-width: 100%;
    font-size: 16px; /* prevents iOS zoom */
  }

  /* Map needs more top room because bar wraps */
  #map {
    top: 132px;
  }

  /* Hide fullscreen button on mobile only */
  .leaflet-control-fullscreen {
    display: none !important;
  }
}
