#msm-container {
  --accent: #00913c;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: min(70vh, 560px);
  min-height: 420px;
  margin: 1rem 0 1.5rem;
  border: 1px solid #ddd;
  background: #fff;
  overflow: hidden;
}
#msm-filter-rodzaj-container {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-bottom: 1px solid #ddd;
  background: #fff;
  z-index: 3;
}
#msm-filter-rodzaj {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
}
#msm-filter-rodzaj label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-height: 40px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
#msm-filter-rodzaj input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  flex-shrink: 0;
  border: 2px solid var(--accent);
  border-radius: 4px;
  background: #fff;
  position: relative;
  cursor: pointer;
}
#msm-filter-rodzaj input[type='checkbox']:checked {
  background: var(--accent);
  border-color: var(--accent);
}
#msm-filter-rodzaj input[type='checkbox']:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
#msm-filter-rodzaj .msm-filter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #00913c;
  flex-shrink: 0;
}
#msm-filter-rodzaj .msm-filter-icon img {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  display: block;
}
#msm-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}
#msm-sidebar {
  width: 350px;
  max-width: 42%;
  background: #fff;
  border-right: 1px solid #ddd;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#msm-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
#msm-list li {
  padding: 14px 12px;
  border-bottom: 1px solid #ccc;
  transition: background 0.15s;
  cursor: pointer;
}
#msm-list li:hover,
#msm-list li.active {
  background: #ffe5e0;
}
#msm-list .msm-title {
  font-size: 16px;
  font-weight: 600;
}
#msm-list .msm-adres {
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
}
#msm-list .msm-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 12px;
  color: #222;
  border: 1px solid #ccc;
}
#msm-list .msm-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
#msm-map {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 320px;
  height: 100%;
  background: #e8ece9;
  position: relative;
  z-index: 0;
  /* no isolation:isolate — breaks tile compositing on small mobile browsers */
}
.leaflet-container {
  height: 100% !important;
  width: 100% !important;
  z-index: 0;
  background: #e8ece9;
}
.leaflet-tile-pane {
  z-index: 200 !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.leaflet-overlay-pane,
.leaflet-shadow-pane,
.leaflet-marker-pane,
.leaflet-tooltip-pane,
.leaflet-popup-pane {
  z-index: 400;
}
.leaflet-tile,
.leaflet-tile-container img {
  visibility: visible !important;
  opacity: 1 !important;
  max-width: none !important;
  max-height: none !important;
}
#msm-map .leaflet-marker-icon.msm-marker {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}
#msm-map .msm-marker__pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #00913c !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
#msm-map .msm-marker__pin img {
  width: 20px;
  height: 20px;
  display: block;
  background: transparent !important;
}
.marker-cluster {
  background: #00913c !important;
  border-radius: 50%;
}
.marker-cluster div {
  background: #00913c !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  border-radius: 50%;
  line-height: 1 !important;
  font-weight: 700;
}
.marker-cluster span {
  color: #fff !important;
  line-height: 1;
}
#msm-map-loader {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 500;
  pointer-events: none;
}

@media (max-width: 900px) {
  #msm-container {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  #msm-body {
    flex-direction: column;
  }
  #msm-map {
    order: -1;
    width: 100%;
    height: 360px !important;
    min-height: 360px !important;
    flex: 0 0 360px;
  }
  #msm-sidebar {
    width: 100%;
    max-width: none;
    border-right: 0;
    border-top: 1px solid #ddd;
    max-height: 320px;
  }
  #msm-filter-rodzaj-container {
    position: sticky;
    top: 60px; /* under sticky site-nav (~52px) + small gap */
    z-index: 5;
  }
  #msm-filter-rodzaj label {
    font-size: 14px;
    min-height: 44px;
  }
}

@media (max-width: 600px) {
  #msm-map {
    height: 320px !important;
    min-height: 320px !important;
    flex-basis: 320px;
  }
  #msm-sidebar {
    max-height: 280px;
  }
  #msm-list li {
    padding: 12px 10px;
  }
}
