html, body, #map {
  height: 100%;
  margin: 0;
  font-family: Arial, sans-serif;
}

#map {
  width: 100%;
  height: 100%;
}

.map-header {
  position: absolute;
  z-index: 1000;
  top: 10px;
  right: 70px;
  left: 70px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.map-header-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.95);
  padding: 8px 18px;
  border: 1px solid #ccc;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.15);
  font-size: 22px;
  font-weight: bold;
  line-height: 1.3;
  text-align: center;
}

.header-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}


.custom-marker-label.other {
  color: #c46a00;
}

.leaflet-popup-content {
  direction: rtl;
  text-align: right;
  line-height: 1.4;
  font-size: 14px;
  min-width: 240px;
  max-width: 340px;
}

.leaflet-popup-content img {
  display: block;
  max-width: 100%;
  max-height: 260px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 8px auto;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}

.leaflet-control-layers {
  margin-top: 70px !important;
}

.title-count {
  font-size: 14px;
  font-weight: normal;
}

/*
  חשוב:
  במבנה המקורי הייתה הזזה ב-CSS:
  transform: translate(...)
  יחד עם iconAnchor ב-JS.
  השילוב הזה עלול ליצור תחושה שהסמן "בורח" בזום.
  לכן ההזזה הוסרה, והמיקום נשלט רק דרך iconAnchor.
*/

.badge-marker-icon {
  background: transparent;
  border: none;
}

.map-tools-box {
  background: rgba(255,255,255,0.95);
  border: 1px solid #bbb;
  border-radius: 8px;
  padding: 5px 7px;
  font-size: 11px;
  line-height: 1.25;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  direction: ltr;
}

.map-tools-btn {
  margin-top: 4px;
  margin-left: 3px;
  padding: 2px 6px;
  font-size: 11px;
  border: 1px solid #aaa;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.map-tools-btn.active {
  background: #d0ebff;
  font-weight: bold;
}

.map-scale-buttons {
  background: rgba(255,255,255,0.95);
  border: 1px solid #bbb;
  border-radius: 8px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.map-scale-buttons button {
  font-size: 11px;
  padding: 3px 7px;
  border: 1px solid #aaa;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.measure-point-label div,
.measure-distance-label div {
  background: rgba(255,255,255,0.88);
  border: 1px solid #777;
  border-radius: 4px;
  padding: 1px 3px;
  font-size: 9px;
  line-height: 1.1;
  white-space: nowrap;
  direction: ltr;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.measure-distance-label div {
  font-size: 10px;
  font-weight: bold;
}
