@import url("https://fonts.googleapis.com/css?family=Lato&display=swap");

h3 {
    text-align: center;
}

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  font-family: Lato;
}

#calculator__section {
  background: url(https://previews.123rf.com/images/wolfelarry/wolfelarry1603/wolfelarry160300087/54415864-money-american-hundred-dollar-bills-usd-background.jpg);
}
#result__section,
#chart__section  {
  background: url(https://wallpaperaccess.com/full/1271317.jpg);
}

#calculator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  padding: 40px;
  background: rgba(0, 0, 0, 0.95);
  box-sizing: border-box;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
}
#calculator h2 {
  margin: 0 0 30px;
  padding: 0;
  color: #fff;
  text-align: center;
}
#calculator .inputField {
  position: relative;
}
#calculator .inputField label {
  position: absolute;
  top: 0;
  left: 0;
  letter-spacing: 1px;
  padding: 10px 0;
  font-size: 16px;
  color: #fff;
  pointer-events: none;
  transition: 0.5s;
  text-transform: uppercase;
}
#calculator .inputField input,
#calculator .inputField select {
  width: 100%;
  padding: 10px 0;
  font-size: 16px;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 30px;
  border: none;
  border-bottom: 1px solid #fff;
  outline: none;
  background: transparent;
}
#calculator .inputField select {
  height: 40px;
  line-height: 40px;
  border-radius: 0;
}
#calculator .inputField input:focus ~ label,
#calculator .inputField input:valid ~ label {
  top: -18px;
  left: 0;
  color: #3f9570;
  font-size: 12px;
}
#calculator input[type="submit"] {
  text-transform: uppercase;
  background: transparent;
  border: none;
  outline: none;
  color: #000;
  font-weight: bold;
  background: #fff;
  padding: 10px 20px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.75s;
}
#calculator input[type="submit"]:hover {
  background: #000;
  color: #fff;
}

/* section styles */
.section-holder {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.section {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  visibility: hidden;
  /* transform: scale(0); */
  width: 100vw;
  height: 100vh;
  transition: all 1s ease;
}
.section * {
  opacity: 0;
  transition: opacity 0.25s 0.75s linear;
}
.section.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}
.section.active * {
  opacity: 1;
}

/* second section */
.recap {
    background:#fff;
    width: 700px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
#recap_table table {
  width: 100%;
  max-height: 400px;
  height: auto;
  min-width: 300px;
  overflow: scroll;
  display: block;
  border: 10px solid white;
  box-sizing: border-box;
}
#recap_table tr {
  cursor: pointer;
  width: 100%;
  display: block;
  height: 30px;
  line-height: 30px;
}
#recap_table tr:nth-child(1) {
    position: sticky;
    top: 0;
    border-bottom: 2px solid #3f9570;
    background: white;
    color: #3f9570;
}
#recap_table tr:nth-child(even) {
  background-color: #444;
  color: #fff;
}
#recap_table tr:not(:nth-child(1)):hover {
  background: #3f9570;
  color: #fff;
}
#recap_table td,
#recap_table th {
  width: 24%;
  display: inline-block;
  text-align: left;
}
#recap_table th {
  vertical-align: top;
  text-transform: uppercase;
}
.section_button {
  cursor: pointer;
  padding: 10px 0;
  width: 250px;
  background: #fff;
  display: flex;
  justify-content: center;
  border: 3px solid #000;
  position: absolute;
  top: 10px;
  left: 10px;
  color: #000;
  text-transform: uppercase;
  font-weight: bold;
  transition: all 0.75s ease;
}
.section_button:hover {
  background: #000;
  color: #fff;
}
#go_to_chart {
  top: 70px;
}
.ct-chart {
    width: 100%;
    height: 300px;
}

@media (min-width: 320px) and (max-width: 480px) {
  #recap_table table {
    padding: 0;
    position: relative;
  }
  #calculator {
    width: 100%;
    height: 100%;
    border-radius: 0;
    justify-content: center;
    display: flex;
    flex-flow: column;
    box-shadow: 0 0 30px #3b8c69;
  }
  .recap {
    width: 100%;
  }
  #recap_table {
    width: 100%;
    margin-top: 20px;
  }
  .section_button {
    top: unset !important;
    margin-bottom: 5px;
    position: relative;
    width: 100vw;
    left: 0;
    top: 0;
    display: flex;
    box-sizing: border-box;
  }
  #recap_table tr {
    width: 150vw;
  }
  #recap_table tr:nth-child(1) {
    background: #fff;
    position: absolute;
  }
  #recap_table tr:nth-child(2) {
      margin-top: 30px;
  }
  #recap_table td,
  #recap_table th {
    font-size: 3vw;
  }
}
