/* leaflet */
#map-wrapper {
  width: 100%;
  height: 650px;
}

#map {
  width: 100%;
  height: 650px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Monochrome map tiles */
.leaflet-tile-pane,
.leaflet-tile-pane img,
.leaflet-tile-container,
.leaflet-layer {
  filter: grayscale(100%) !important;
  -webkit-filter: grayscale(100%) !important;
}

.custom-popup .leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-popup .leaflet-popup-content {
  margin: 12px 16px;
  min-width: 180px;
  max-width: calc(100vw - 80px);
}

.popup-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.popup-description {
  font-size: 14px;
  color: #4a4a68;
  line-height: 1.5;
}

.popup-category {
  display: inline-block;
  background: #e8f4f8;
  color: #0077b6;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  margin-top: 8px;
}

.popup-link {
  display: inline-block;
  margin-top: 10px;
  color: #0077b6;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.popup-link:hover {
  text-decoration: underline;
}

/* Custom cluster styles */
.marker-cluster-small {
  background-color: rgba(110, 204, 57, 0.6);
}
.marker-cluster-small div {
  background-color: rgba(110, 204, 57, 0.8);
}

.marker-cluster-medium {
  background-color: rgba(240, 194, 12, 0.6);
}
.marker-cluster-medium div {
  background-color: rgba(240, 194, 12, 0.8);
}

.marker-cluster-large {
  background-color: rgba(241, 128, 23, 0.6);
}
.marker-cluster-large div {
  background-color: rgba(241, 128, 23, 0.8);
}

.marker-cluster {
  background-clip: padding-box;
  border-radius: 50%;
}
.marker-cluster div {
  width: 30px;
  height: 30px;
  margin-left: 5px;
  margin-top: 5px;
  text-align: center;
  border-radius: 50%;
  font: 12px "Helvetica Neue", Arial, sans-serif;
  font-weight: bold;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Controls panel */
.controls-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  background: white;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  max-width: calc(100vw - 20px);
}

.controls-panel button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  margin-bottom: 8px;
  border: none;
  background: #0077b6;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.controls-panel button:last-child {
  margin-bottom: 0;
}

.controls-panel button:hover {
  background: #005f8a;
}

.controls-panel button:active {
  background: #004a6e;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .controls-panel {
    top: auto;
    bottom: 20px;
    right: 10px;
    left: 10px;
    display: flex;
    gap: 8px;
    padding: 8px;
  }

  .controls-panel button {
    flex: 1;
    padding: 12px 8px;
    font-size: 12px;
    margin-bottom: 0;
  }

  .custom-popup .leaflet-popup-content {
    min-width: 150px;
  }
}
