body {
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

#map {
  margin: 0 auto;
  width: 100%;
  height: 100%;
}

#search-container {
  display: flex;
  align-items: center;
  position: absolute;
  top: 15px;
  left: 30px;
  max-width: 325px;
  width: calc(100% - 40px);
  background-color: #fff;
  border-radius: 20px;
  padding: 5px 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  /* width: fit-content; */
}

.color-white {
  color: white;
}

.search-box-input {
  max-width: 275px;
  width: 100%;
  min-height: 30px;
  outline: none;
  border: none;
  flex: 1;
  padding: 2px 5px;
  border-radius: 20px;
  font-size: 14px;
  color: #333;
  background-color: transparent;
  flex-grow: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-box-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  background-color: #fdffff;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
}

.clear-box {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 20px;
  height: 29px;
  background-color: #fdffff;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.direction-box-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  background-color: #fdffff;
  cursor: pointer;
  padding-left: 10px;
}

.direction-box-btn img {
  width: 100%;
  padding-bottom: 3px;
  margin: 0 !important;
}

.search-result {
  position: absolute;
  top: 30px;
  left: -8px;
  width: 100%;
  background-color: white;
  z-index: 20;
  padding: 20px 0;
  margin: 8px;
  display: none;
  border-radius: 0 0 20px 20px;
}

.result-box {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
}

/* .result-box:last-child {
  border-radius: 0 0 20px 20px;
} */

.icon-div {
  margin-right: 10px;
  flex-shrink: 0;
}

.fa-map-marker-alt {
  color: #333;
}

.description-text {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1; /* Ensures text takes up remaining space */
  max-width: 100%; /* Limits text to a single row */
}

.result-box:hover {
  background-color: rgb(221, 221, 221);
}

.display-none {
  display: none;
}

.input-direction-container {
  /* margin: 30px 0; */
  position: absolute;
  display: none;
  left: 60px;
  top: 30px;
}

.close-directions {
  margin-left: 10px;
}

.direction {
  width: 100px;
  /* height: 40px; */
}

.search-box-direction {
  width: 350px;
  height: 40px;
  border-left: none;
  padding: 1px 8px;
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
  outline: none;
  border-radius: 2px 0 0 2px;
  border: 1px solid transparent;
}

#start,
#end {
  width: 300px;
  /* padding: 15px; */
  margin-right: 10px;
  /* margin-left: 10px; */
}

#get-directions {
  padding: 5px 10px;
}

#coordinates {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 5px 10px;
  margin: 0;
  font-size: 11px;
  line-height: 18px;
  border-radius: 3px;
  display: none;
}

.search-result-start {
  position: absolute;
  top: 44px;
  width: 432px;
  background-color: white;
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.07);
  z-index: 2;
  border-radius: 2px;
  padding: 8px;
  display: none;
}

.search-result-end {
  position: absolute;
  top: 44px;
  width: 432px;
  background-color: white;
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.07);
  z-index: 2;
  border-radius: 2px;
  padding: 8px;
  display: none;
}

.map-container {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
}

.tab-container {
  width: 45%;
  max-width: 400px;
  position: absolute;
  top: 15px;
  left: 20px;
  background: rgb(255, 255, 255);
  border-radius: 7px;
  z-index: 10;
}

.tab-header {
  display: flex;
  justify-content: space-between;
  border: 1px solid #ddd;
  padding: 0 10px;
  border-radius: 7px 7px 0 0;
}

.tab-btn {
  width: 100%; /*adjust if more*/
  padding: 10px;
  background: none;
  border: none;
  outline: none;
  color: #000;
  font-size: 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tab-btn:hover {
  border-bottom: 2px solid #75a0ea;
}

.tab-btn.active {
  border-bottom: 2px solid #007bff;
}

.scaled-down {
  transform: scale(0.8);
  transform-origin: top left;
}

.filter-container {
  display: flex;
  justify-content: space-between;
  padding: 10px;
}

.dropdown {
  width: 48%;
  padding: 10px;
  border: 1px solid #ddd;
  background-color: #fff;
  font-size: 14px;
  color: grey;
  margin-bottom: 10px;
  overflow-x: hidden;
  outline: none;
}

.dropdown:hover {
  outline: none;
  border-color: #888;
  transition: all 0.3s ease-in-out;
}

.bold {
  font-weight: bold;
}

.list-search-container {
  margin: 0 auto;
  background-color: #fff;
  border-radius: 0 0 7px 7px;
}

.search-header {
  display: flex;
  justify-content: space-between;
  padding: 0 15px 10px 15px;
  color: #75a0ea;
}

#collapse-btn {
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
}

#collapse-btn i {
  color: hsl(220deg 7.44% 23.73%);
  font-size: 13px;
}

.search-bar-container {
  display: flex;
  align-items: center;
  padding: 0 10px;
  margin: 10px 0;
  background-color: rgb(243 244 246);
}

#search-input {
  flex-grow: 1;
  border: none;
  background: none;
  outline: none;
  padding: 8px 8px 8px 16px;
  font-size: 16px;
  min-width: 20px;
  line-height: 2;
}

#nearest-location-btn {
  border: none;
  background: none;
  outline: none;
  cursor: pointer;
  padding-right: 8px;
}

#nearest-location-btn i {
  position: relative;
  font-size: 18px;
}

#nearest-location-btn i::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background-color: rgba(29, 161, 242, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: btn-wave 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes btn-wave {
  75%,
  100% {
    transform: translate(-50%, -50%) scale(4);
    opacity: 0;
  }
}

.map {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  background-color: #fff;
  transition: max-height 0.5s ease-in-out;
  border-radius: 0 0 7px 7px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid #ddd;
  background-color: #fff;
  cursor: pointer;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background-color: #f1f1f1;
}

.list-item.selected {
  border-left: 5px solid #007bff;
}

.list-container {
  max-height: 300px;
  overflow-y: auto;
}

.list-info {
  display: flex;
  flex-direction: column;
}

.list-title {
  font-weight: bold;
}

.list-info span {
  font-size: 14px;
}

.list-info p {
  color: #666;
  font-size: 12px;
  margin-top: 4px;
  margin-bottom: 0;
}

.custom-icon {
  font-size: 20px;
}

.list-action {
  padding: 10px;
}

.custom-icon {
  text-decoration: none;
  color: #007bff;
}

.list-item.selected {
  border-left: 5px solid #007bff;
}

@media screen and (max-width: 1200px), screen and (max-height: 600px) {
  .tab-container {
    position: static;
    width: 100%;
    max-width: 100vw;
  }

  #map {
    height: 80vh; /* Adjust the height of the map for smaller screens */
  }

  .scaled-down {
    transform: scale(1);
    transform-origin: top left;
  }
}

@media screen and (max-width: 496px) {
  #search-container {
    left: 0;
    margin: 0 5vw;
  }

  .search-box-input {
    width: calc(100% - 10vw);
  }

  .search-result {
    width: 100%;
  }
}

/*Pop up marker info*/
.maplibregl-popup-content {
  width: 300px !important;
  position: relative;
  border: 2px solid #ccc;
  border-radius: 8px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  right: 2rem;
}

.maplibregl-popup-close-button {
  position: absolute;
  top: 8px;
  right: 2px;
  background-color: #4a89dc;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.maplibregl-popup-close-button:hover {
  background-color: #357abd !important;
  color: #fff !important;
}

.maplibregl-popup-close-button:hover {
  color: #000;
  background-color: transparent;
  outline: none;
}

.maplibregl-popup-tip {
  margin-bottom: 10px;
}

.popup-content {
  color: #333;
  width: 290px;
  overflow: hidden;
}

.popup-header {
  background-color: #7ed2f7;
  padding: 8px;
  border-radius: 4px;
  text-align: left;
  position: relative;
}

.popup-header h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #f6fcfe;
  font-family: "Roboto", Arial, sans-serif;
}

.popup-body {
  display: flex;
  padding: 10px 10px 0 10px;
}

.info-panel {
  flex: 1;
  color: #555;
}

.info-panel p {
  margin: 5px 0;
  font-size: 0.75rem;
  font-family: "Roboto", Arial, sans-serif;
}

.icon-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
}

.google_map_link,
.google_map_link:focus {
  outline: none;
}

/*Pop up marker info*/

/*Map size*/
.small-map {
  width: 33%;
}

.small-map #map {
  height: 40vh;
}

.small-map #search-container {
  left: 10px;
  width: calc(100% - 20px);
}

.small-map .search-result {
  max-height: 180px;
  overflow: auto;
  padding: 0;
}

.medium-map {
  width: 66%;
}

.medium-map #map {
  height: 60vh;
}

.large-map {
  width: 100%;
}

.large-map #map {
  height: 80vh;
}
/*Map size*/

/* Styles for .small-map and .medium-map */
.small-tab.tab-container,
.medium-tab.tab-container {
  position: static;
  max-width: 100%;
  margin: 0 auto;
}

.small-tab.tab-container {
  width: 600px;
}

.medium-tab.tab-container {
  width: 1000px;
}

.custom-marker {
  width: 15px;
  height: 15px;
  background-color: #1da1f2;
  border: 2px solid white;
  border-radius: 50%;
}

/* Create the wave effect */
.custom-marker::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  background-color: rgba(29, 161, 242, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  animation: wave 1.5s infinite;
}

/* Define the wave animation */
@keyframes wave {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

#toplevel_page_goongmap:hover .wp-submenu,
#toplevel_page_goongmap .wp-submenu:hover {
  top: -1px;
}
