/* map */

#map {
  position: relative;
  /* height: 70%; */
  height: 75%;
  width: 100%;
  z-index: 1;
}

/* Button for showing stations */
#showStationsBtn {
  position: relative;
  /* bottom: 450px;
  left: 10px; */
  bottom: 490px; /* Riktig høyde til vår prosjektor hjemme. Må nok endres før pres */
  left: 12px;
  width: 50px;
  padding: 12px 9px 9px 9px;
  font-size: 24px;
  color: white;
  background-color: #07494f;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 99; /* Higher than map but lower than the panel */
}

#underKart {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-bottom: -10px;
}

#showStationsBtn:hover {
  background-color: #3b472d;
}

/* Overlay panel for stations, using fixed positioning to cover the viewport */
.stationsPanel {
  position: fixed;
  top: 115px;
  left: 50px;
  width: 90%;
  height: 85%;
  background: white;
  z-index: 3; /* Ensure this is the highest in context */
  display: none; /* Hidden by default */
  border: 1px solid black;
}

#stationsFrame {
  width: 100%;
  height: 100%;
  border: none;
}

/*      Navigation Panel Styles      */
#routeForm,
#navigationPanel,
#bottomNav {
  width: 100%;
  min-height: 300px;
  border-radius: 20px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding: 5px 20px 20px 20px;
  /* border: 1px solid #ccc; */
}

.mapContent {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
#stops {
  margin-bottom: 1rem;
}
/* input with current location icon */
.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

#from {
  padding-right: 30px; /* Add padding to prevent text from hiding behind the icon */
  flex-grow: 1; /* Allows input to expand to fill space */
  border: 1px solid #7bcbc6;
}

#currentLocationButton {
  position: absolute;
  right: 10px; /* Position icon inside the input on the right */
  width: 20px; /* Adjust size as necessary */
  height: 20px; /* Adjust size as necessary */
}

input[type="text"] {
  /* width: calc(100% - 22px); */
  padding: 10px;
  margin: 0.5rem 0;
  box-sizing: border-box;
  border: 1px solid #7bcbc6;
  border-radius: 6px;
}
/* Legg til stop button */
#stops {
  width: 150px;
  height: 35px;
  background-color: white; /* Choose a background color that fits your design */
  border: none; /* Removes the default border */
  border-radius: 5px; /* Optional: rounds the corners of the button */
  box-shadow: 0px 4px 8px rgba(123, 203, 198, 0.5); /* Shadow with your color */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px; /* Adjust padding as needed */
  font-size: 14px; /* Adjust font size as needed */
  cursor: pointer; /* Cursor changes to pointer to indicate this is a clickable item */
  outline: none; /* Removes the focus outline - use with caution */
}

#stops img {
  width: 20px; /* Adjust size of the image icon as needed */
  margin-right: 1px; /* Spacing between the icon and text */
}

.filled-button {
  width: 50%;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 30px;
}

.stops-input {
  /* width: calc(100% - 22px); */
  width: 100%;
  padding: 10px;
  margin: 5px 0;
  box-sizing: border-box;
}

.remove-stop-button {
  margin-top: 0.5rem;
  padding: 10px 20px;
  background-color: #801c0f; /* Red color for removal indication */
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 6px;
}

.remove-stop-button:hover {
  background-color: #a82413;
}

/* navigation panel elements*/
.first-charging-station {
  display: flex;
  padding: 15px 20px;
  align-items: center;
  gap: 35px 20px;
  margin: 20px 0px;
  justify-content: space-between;
  cursor: pointer;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0px 2px 6px 0px #83c5be80;
}

.first-charging-station a {
  color: #000000;
  font-weight: bold;
  text-decoration: none;
}

/* Live navigation and information pane */
.navigation-pane {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #fff;
  border-top: 1px solid #ccc;
  padding: 10px;
  z-index: 5;
  transition: transform 0.3s ease-in-out; /* Smooth transition for transform */
  transform: translateY(100%); /* Start off screen */
}

/* Class to apply when pane is active */
.navigation-pane.active {
  transform: translateY(0); /* Adjust to show the pane */
}

.directions-header h2,
.charging-station-info h3 {
  color: #1b1b1b;
}
.directions-header h2 {
  width: 95%;
  margin: auto;
}

.live-directions p {
  margin: 5px 0;
  font-size: 16px;
}

.charging-station-info p {
  font-size: 14px;
  color: #666;
}

.end-nav-button {
  width: 50%;
  height: 3rem;
  margin: auto;
  padding: 10px;
  background-color: #801c0f;
  color: white;
  font-size: 0.875rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.end-nav-button:hover {
  background-color: #a82413;
}

/* Veibeskrivelse */
.directions-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 375px;
  overflow-y: auto;
}
.charging-station-info {
  display: flex;
  padding: 15px 10px;
  align-items: center;
  gap: 35px 20px;
  justify-content: space-between;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0px 2px 6px 0px #83c5be80;
  width: 95%;
  margin: auto;
  margin-bottom: 1rem;
}
.charging-station-info a {
  text-decoration: none;
  font-weight: 600;
  color: #000000;
}
.live-directions {
  width: 95%;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 5rem;
  color: #1b1b1b;
}
.route-summary {
  padding-bottom: 0.5rem;
  width: 95%;
  margin: auto;
  margin-top: 1rem;
}
.route-summary p {
  font-size: 1.25rem;
  margin-top: 0.2rem;
}

#liveDirections > p:nth-child(4),
#liveDirections > p:nth-child(7),
#liveDirections > p:nth-child(10) {
  display: none;
}

#liveDirections > p:nth-child(17) {
  margin-bottom: 20px;
}

.sticky-part-of-directions {
  background-color: #ffffff;
  display: flex;
  width: 100%;
  margin: auto;
  flex-direction: column;
  padding: 1rem;
  padding-bottom: 10rem;
  position: fixed;
  bottom: 80px;
  transform: translateY(100%);
}
.sticky-part-of-directions.active {
  transform: translateY(0%);
}
#liveDirections > p:nth-child(1) {
  font-size: 1.5rem;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0px 2px 6px 0px #83c5be80;
}

#distanceInfo {
  display: flex;
  flex-direction: row;
  justify-content: right;
  align-items: center;
  gap: 50px;
}
