html, body {
  height: 100%;
  margin: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

h2, p, a, img {
  margin: 0;
  padding: 0;
}

#main {
  display: flex;
  height: 100%;
}

#side {
  width: 500px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

#side-profile {
  width: 600px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

#map {
  flex: 1
}

#code {
  font-size: 12px;
}

#cards {
  display: none;
  gap: 20px;
  width: 100%;
}

#card {
  width: 80%;
  border: lightgrey 1px solid;
  border-radius: 5px;
  text-decoration: none;
}

#previous, #next {
  background-color: black;
  margin: auto 0;
  height: 40px;
  width: 40px;
  border-style: none;
  border-radius: 50%;
  padding: 5px 10px;
  cursor: pointer;
}

#previous[disabled], #next[disabled] {
  background-color: lightgray;
  cursor: unset;
}

#previous {
  transform: rotate(180deg);
}

.card-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  vertical-align: top;
}

.card-info {
  color: black;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-properties {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-column-gap: 6px;
  grid-row-gap: 6px;
}

.card-properties pre {
  margin: 0;
}

.card-facts {
  display: flex;
  height: 60px;
  width: 100%;
}

.fact {
  width:25%;
  font-size: 14px;
  height: 60px;
  color: black;
  border-top: lightgrey 1px solid;
  display: flex;
  justify-content: center;
  align-items: center;
}

.fact:not(:first-child) {
  border-left: lightgrey 1px solid;
}

#save {
  background-color: #FBC200;
  border-style: none;
  border-radius: 5px;
  padding: 5px 10px;
  margin-top: 40px;
  width: 100%;
  cursor: pointer;
}

#load-hiking, #import-gpx-kml {
  width: 100%;
  display: flex;
  gap: 5px;
}

#gpx-kml-file {
  background-color: #eeeeee;
  flex: 1;
}

#hiking-uuid {
  flex: 1;
}

#distance-info {
  font-size: small;
  margin-top: 5px;
}

h2 {
  font-size: medium;
  margin-top: 30px;
}

#filter-input {
  margin-top: 10px;
}


#stopovers .stopover {
  padding: 10px;
  margin: 4px 0;
  border: 1px solid #ccc;
}

#stopovers .stopover:hover {
  background-color: #f9f9f9;
}

#filters {
  padding-bottom: 40px;
}

.stopover {
  border: 1px solid #ccc;
  margin: 12px;
  padding: 6px;
}
.stopover > * {
  padding: 6px;
}
.stopover .features label {
  display: block;
}
.statistics-container {
    display: flex;
    flex-direction: column;
}
.statistics-container > button {
  height: 100%;
}
.modal {
  display: none;
  position: absolute;
  z-index: 1;
  background-color: white;
  margin-top: 30px;
  padding: 20px;
  border: 1px solid #888;
}
.modal.show {
  display: block;
}
.btns-container {
  display: flex;
  gap: 5px;
  width: 100%;
}
.btns-container > * {
  height: 40px;
}
.btns-container > #save {
    margin: 0px;
    width: auto;
}


@media (max-width: 950px) {
  #main {
    height: 100%;
    flex-direction: column-reverse;
  }
  #map {
    height: 70%;
  }
  #side, #side-profile {
    height: 30%;
    width: 100%;
    box-sizing: border-box;
  }
  #cards {
    position: relative;
    width: 100%;
    padding-bottom: 40px;
  }
  #card {
    width: 100%;
  }
  #previous {
    position: absolute;
    top: 25%;
    left: 10px;
  }
  #next {
    position: absolute;
    top: 25%;
    right: 10px;
  }
  .btns-container{
    flex-wrap: wrap;
    padding-bottom: 20px;
  }
  .stopover {
    margin: 0px;
  }
}