#container {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* Style for the map container */
#map {
  flex: 1; /* Allow the map to take up the remaining space */
  height: 100vh;
  transition: width 0.3s ease; /* Smooth transition when resizing */
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Sidebar styling (hidden by default) */
#sidebar {
  width: 100%;
  padding: 20px;
  overflow-x: hidden;
  background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent background */
  z-index: 1000; /* Ensure it's on top of other elements */
  border-left: 1px solid #ddd;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#sidebar-main-title {
  font-size: 25px;
  font-family: Roboto;
}

#sidebar-subtitle {
  font-size: 14px;
  font-family: Roboto;
}

#search-input {
  display: flex;
  justify-content: space-between;
  background-color: #f1f3f4;
  height: 50px;
  padding: 4px 8px 4px 16px;
  border-radius: 8px;
}

#autocomplete {
  border-width: 0px;
  background-color: transparent;
  font-size: 16px;
  width: 100%;
}

#search-icon {
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#search-icon img {
  width: 30px;
  height: 30px;
  display: inline-block;
}

#sidebar-title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

#region-properties {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: #5f6368;
}

#legend {
  position: absolute;
  z-index: 9999;
  top: 60px;
  left: 10px;
  padding: 10px;
  background-color: white;
  font-size: 14px;
  border-radius: 2px;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;
  font-family: "Roboto", Arial, sans-serif;
  color: rgb(86, 86, 86);
}

.legend-scale {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-gradient {
  width: 100px;
  height: 10px;
  background: linear-gradient(to right, rgb(0, 255, 0), rgb(0, 100, 0));
  border: 1px solid #ddd;
}

.tree-recommendations {
  margin-top: 20px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.tree-recommendations-header {
  font-size: 16px;
  color: #333;
  margin-bottom: 8px;
}

.tree-recommendations-note {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.4;
}

.tree-family {
  border-bottom: 1px solid #eee;
}

.tree-family-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  cursor: pointer;
}

.tree-family-name {
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.tree-family-toggle {
  color: #666;
  transform: rotate(180deg);
  transition: transform 0.2s ease;
}

.tree-family-toggle.open {
  transform: rotate(0deg);
}

.tree-species-list {
  display: none;
  padding: 0 0 12px 0;
}

.tree-species-list.open {
  display: block;
}

.tree-species {
  color: #2196f3;
  text-decoration: none;
  display: block;
  padding: 8px 0;
  font-size: 14px;
}

.tree-species:hover {
  text-decoration: underline;
}

.sidebar-button {
  width: 100%;
  padding: 10px 18px;
  background-color: #f0f4ff;
  border: none;
  border-radius: 6px;
  color: #4285f4;
  font-size: 15px;
  font-weight: 200;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s ease;
}

.sidebar-button:hover {
  background-color: #e8efff;
}

.sidebar-button:active {
  background-color: #dfe9ff;
}

.sidebar-link {
  font-family: Roboto;
}

@media (min-width: 768px) {
  #map-wrapper {
    display: flex;
    position: relative;
    flex-direction: row;
  }

  #map {
    width: 100%;
  }

  #sidebar {
    width: 300px;
  }

  #legend {
    top: auto;
    bottom: 20px;
    left: 20px;
  }
}
