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

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

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

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

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

#map {
  flex: 1;
}

#code {
  font-size: 12px;
}

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

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

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

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

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

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

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

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

.card-properties pre {
  margin: 0;
}

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

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

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

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

#new_line, #delete_line {
  width: initial;
}

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

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

#hiking-uuid {
  flex: 1;
}

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

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

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

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

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

#filters {
  padding-bottom: 40px;
}

.hiking-facts, .stopover {
  border: 1px solid #ccc;
  margin: 12px;
  padding: 6px;
}

.hiking-facts > *, .stopover > * {
  padding: 6px;
}

.hiking-facts label, .stopover .features label {
  display: block;
}

.statistics-container {
  flex-direction: column;
  display: flex;
}

.statistics-container > button {
  height: 100%;
}

.modal {
  z-index: 1;
  background-color: #fff;
  border: 1px solid #888;
  margin-top: 30px;
  padding: 20px;
  display: none;
  position: absolute;
}

.modal.show {
  display: block;
}

.btns-container {
  justify-content: space-between;
  gap: 5px;
  width: 100%;
  display: flex;
}

.btns-container > * {
  height: 40px;
}

.btns-container > #save {
  width: auto;
  margin: 0;
}

.hiking-facts-header {
  justify-content: space-between;
  align-items: center;
  display: flex;
}

@media (width <= 950px) {
  #main {
    flex-direction: column-reverse;
    height: 100%;
  }

  #map {
    height: 70%;
  }

  #side, #side-profile {
    box-sizing: border-box;
    width: 100%;
    height: 30%;
  }

  #cards {
    width: 100%;
    padding-bottom: 40px;
    position: relative;
  }

  #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;
  }

  .hiking-facts, .stopover {
    margin: 0;
  }
}
