* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-touch-callout: none;
  -webkit-text-size-adjust: none;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: "Inter", sans-serif;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.344);
  z-index: 999;
  display: none;
}
.overlay,
.about-popup {
  transition: opacity 0.3s ease;
}

.lang-switch {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 9999; /* Higher than overlay */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.lang-switch button {
  background: white !important;
  border: 1px solid #000000 !important;
  border-radius: 10px;
  color: #000000 !important;
  padding: 5px;
  cursor: pointer;
}

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

.leaflet-tooltip.marker-label {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  font-size: 14px;
  font-weight: normal;
  color: white;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}

.leaflet-popup-content {
  width: 500px !important;
  font-size: 16px;
  line-height: 1.6;
}
.leaflet-popup-content img {
  width: 100%;
  max-height: 400px;
  object-fit: fill;
  border-radius: 8px;
  margin: 10px 0;
}
.leaflet-popup-content a,
.leaflet-popup-content button {
  color: #27ae60;
  font-weight: bold;
  margin-top: 10px;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-block;
  font-size: 15px;
  padding: 0;
}

.leaflet-routing-container {
  display: none;
}
.map-buttons {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #000;
  z-index: 1000 !important;
}

.map-buttons button {
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;

  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.map-buttons button.active {
  background: rgb(11, 161, 46);
  color: white;
}
/* .map-header {
  position: absolute;
  top: 10px;
  right: 0px;
  left: 0px;
  text-align: center;
  width: 200px;
  margin: auto;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 28px;
  font-weight: bold;
} */
.clear-route-button {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1000;
  display: none;
}
.about-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  text-align: center;
}
.about-popup h2 {
  margin-bottom: 10px;
}
.about-popup .button {
  margin-top: 20px;
  padding: 10px 20px;
  border: none;
  background-color: #27ae60;
  color: white;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
}
.about-popup button:hover {
  background-color: #219150;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  z-index: 99999;
  padding: 10px;
}

.legend {
  position: absolute;
  bottom: 10px;
  left: 15px;
  z-index: 9999;
  color: white;
  background-color: rgba(18, 18, 18, 1);
  width: 170px;
  padding: 20px;
  border-radius: 10px;
  transition: transform 0.4s ease;
}

.legend.hidden {
  transform: translateX(-180px);
}

.legend-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.legend-close {
  cursor: pointer;
  font-size: 18px;
  transition: transform 0.3s ease;
  position: relative;
  bottom: 8px;
  left: 5px;
}
.legend-close:hover {
  transform: rotate(90deg);
}

.legend-open {
  position: absolute;
  bottom: 20px;
  left: 15px;
  z-index: 9998;
  padding: 8px 12px;
  background: rgba(18, 18, 18, 0.8);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: none;
  transition: background 0.3s ease;
}

.legend-open:hover {
  background: rgba(18, 18, 18, 1);
}

.legend h2 {
  padding-bottom: 10px;
  font-size: 17px;
}

.legend p {
  color: white;
  font-size: 13px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.legend-item img {
  flex-shrink: 0;
}

.legend-item span {
  font-size: 13px;
  color: white;
}

@media (max-width: 768px) {
  .leaflet-popup-content {
    width: 250px !important;
    font-size: 14px;
  }
  .map-header {
    font-size: 18px;
    padding: 8px 8px;
    width: 120px;
  }
  .legend-item span {
    font-size: 11px;
    color: white;
  }
  .legend {
    width: 150px;
  }
}
