#map {
  border: 0px;
  width: 100%;
  height: 100%;
}

/* ========== CONTROL BUTTONS ========== */
.leaflet-control-locate,
.leaflet-control-layers-toggle {
  position: relative !important;
  display: inline-block !important;
  bottom: 0.15cm !important;
}

#leaflet-control-locate-button,
#leaflet-control-layers-toggle-button {
  margin: 0px !important;
  padding: 10px !important;
}

/* ========== MARKERS ========== */
.map-my-location-marker {
  width: 10px;
  height: 10px;
  background-color: #3355ff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0px 0px 4px #000055;
}

.poi-marker-frame {
  background-color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 5px;
  width: 21px;
  height: 21px;
  box-shadow: -1px 1px 2px #666666;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: rotate(-45deg);
  padding: 0;
}

.poi-marker {
  background-color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: rotate(45deg);
}

.poi-marker span.icon {
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
}

.search-marker-frame {
  background-color: #ff0000;
  border-radius: 50% 50% 50% 3px;
  width: 26px;
  height: 26px;
  box-shadow: -1px 1px 2px #666666;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: rotate(-45deg);
  padding: 0;
}

.search-marker {
  background-color: #bb0000;
  border: none;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  display: flex;
}

/* ========== CUSTOM SEARCH ========== */
.leaflet-control-custom-search {
  background: #fff;
  border-radius: 25px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
  padding: 6px;
  margin-top: 10px;
  margin-right: 10px;
  width: 300px;
  border: none !important;
}

.leaflet-control-custom-search .leaflet-search-form {
  display: flex;
  width: 100%;
}

.leaflet-control-custom-search input {
  padding: 6px;
  width: 100%;
  font-size: 14px;
}

.leaflet-control-custom-search button {
  padding: 6px;
  margin: 1px 2px;
}

/* Search suggestions dropdown */
#search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 25px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.suggestion-item {
  padding: 8px 10px;
  cursor: pointer;
  background: #fff;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.suggestion-item:hover {
  background: #f0f0f0;
}

.no-suggestions {
  padding: 8px 10px;
  color: #666;
}

/* ========== POPUPS ========== */
.custom-popup {
  display: none;
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: min(500px, 100%);
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  overflow: hidden;
}

.custom-popup-title {
  font-size: 23px;
  margin: 8px;
}

.custom-popup-header {
  display: flex;
  justify-content: space-between;
  padding: 5px;
  background-color: #ffffff;
  border-bottom: 1px solid #dee2e6;
}

.custom-popup-header button {
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.custom-popup-content {
  height: calc(100% - 40px);
  overflow-y: auto;
  padding: 10px;
  box-sizing: border-box;
}

@media only screen and (max-width: 900px) {
  .custom-popup {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 50%;
    width: 100%;
  }
}

/* ========== POI INFO STYLING ========== */
.poi-info-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.poi-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
  line-height: 1.4;
}

.poi-info-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.poi-info-item .icon {
  font-size: 18px;
  width: 20px;
  text-align: center;
  color: #555;
}

.poi-link {
  color: #111;
  text-decoration: underline;
  font-weight: 500;
}

.poi-link:hover {
  color: #111;
}
.poi-link:visited {
  color: #111;
}

/* ========== DARK MODE ========== */
@media (prefers-color-scheme: dark) {
  .custom-popup {
    background-color: #333;
    border: 1px solid #555;
  }

  .custom-popup-header {
    background-color: #000;
    border-bottom: 1px solid #555;
  }

  .custom-popup-content {
    color: #f0f0f0;
  }

  .leaflet-control-custom-search {
    background: #333;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  }

  .leaflet-control-custom-search input {
    background-color: #333;
    color: #f0f0f0;
    border-color: #555;
  }

  #search-suggestions {
    background: #000;
  }

  .suggestion-item {
    background: #000;
  }

  .suggestion-item:hover {
    background: #222;
  }

  .poi-info-item {
    border-bottom: 1px solid #404040;
  }

  .poi-info-item .icon {
    color: #aaa;
  }

  .poi-link {
    color: #eee;
  }

  .poi-link:hover {
    color: #eee;
  }
  .poi-link:visited {
    color: #eee;
  }
}
