@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap");

html {
  font-size: 10px;
}

body {
  background-color: #9fd3c7;
  font-family: "Quicksand", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main {
  background-image: linear-gradient(
    to top,
    #d5d4d0 0%,
    #d5d4d0 1%,
    #eeeeec 31%,
    #efeeec 75%,
    #e9e9e7 100%
  );
  padding: 2rem;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
  border-radius: 1rem;
  width: 90vw;
  max-width: 70rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 0;
  margin: 2rem;
}

.container {
  width: 100%;
}

.header h1 {
  text-align: center;
  font-size: 4.5rem;
  color: #142d4c;
  line-height: normal;
  margin-bottom: 3rem;
  text-shadow: 3px 3px #9fd3c7;
}

.first-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.title h2 {
  font-size: 4rem;
  font-weight: 600;
  text-align: center;
  color: #385170;
}

.result-container {
  margin-top: 1rem;
  text-align: center;
  margin-bottom: 2rem;
}

.result-container h3 {
  font-size: 2.4rem;
  color: #385170;
}

.result-container p span {
  font-weight: 500;
  color: #000;
}

.result-container p {
  font-size: 1.9rem;
  font-weight: 400;
}

.result-container .summary {
  margin-top: 1rem;
  font-size: 2.2rem;
  font-weight: 600;
}

.result-container p.loss {
  color: rgba(255, 61, 47, 0.973);
  text-shadow: 0 1px #ac5d49;
}

.result-container p.profit {
  color: rgba(112, 192, 92, 0.973);
  text-shadow: 1px 1px #9fd3c7;
}

.result-container p.equal {
  color: rgba(46, 160, 236, 0.973);
  text-shadow: 0 1px #488fe0;
}

.date input {
  width: 22rem;
  height: 4rem;
  padding-left: 0.5rem;
  margin-bottom: 2rem;
  font-size: 2rem;
  font-weight: 500;
  border: none;
  background-color: #9fd3c7;
  border-radius: 0.5rem;
}

.date label,
.price label {
  font-size: 2rem;
  font-weight: 500;
  display: block;
  margin-bottom: 0.5rem;
}

input.input-price {
  border: none;
  outline: none;
  background-color: transparent;
  font-size: 2rem;
  font-weight: 500;
  width: 19.5rem;
}

.price-input-container {
  height: 4rem;
  margin-bottom: 2rem;
  background-color: #9fd3c7;
  border-radius: 0.5rem;
  display: flex;
}

.price-input-container .symbol {
  font-size: 2rem;
  font-weight: 500;
  padding-left: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  line-height: 3rem;
}

.price-input-container:focus-within,
.date input:focus-within {
  outline: #000 2px solid;
  border-radius: 0.5rem;
}

hr {
  color: #9fd3c7;
  opacity: 0.3;
}

input.input-price::-webkit-outer-spin-button,
input.input-price::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input.input-price[type="number"] {
  -moz-appearance: textfield;
}

/* Fill button styling: https://codepen.io/joebocock/pen/ZEWoMPb */
.fill {
  border-radius: 0.5rem;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 1px;
  padding: 13px 50px;
  outline: 0;
  border: 1px solid #000;
  cursor: pointer;
  position: relative;
  background-color: transparent;
}

.fill::after {
  content: "";
  background-color: #9fd3c7;
  width: 100%;
  z-index: -1;
  position: absolute;
  height: 100%;
  top: 7px;
  left: 7px;
  transition: 0.2s;
  border-radius: 0.5rem;
}

.fill:hover::after {
  top: 0;
  left: 0;
}
/* End of Fill Button  */

.button-container {
  text-align: center;
  padding: 3rem;
}

.result-container {
  padding: 1rem 2rem;
  display: none;
}

.error {
  outline: rgba(255, 61, 47, 0.973) 0px solid;
  animation-name: error-animation;
  animation-duration: 2s;
  animation-iteration-count: 10;
}
@keyframes error-animation {
  0% {outline-width: 1px;}
  20% {outline-width: 2px;}
  40% {outline-width: 3px;}
  60% {outline-width: 2px;}
  80% {outline-width: 1px;}
  100% {outline-width: 0px;}
}


@media screen and (max-width: 767px) {
  html {
    font-size: 7.3px;
  }

  .main {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    margin: 0;
    }

  .result-container {
    padding: 1rem 2rem;
  }
}

@media screen and (max-width: 320px) {
  .button-container {
    padding: 3rem 1rem;
  }
}
