body {
  background-color: #c5e4e7;
  font-family: "Space Mono", monospace;
}

h1,
h3 {
  margin: 0;
}

#heading {
  text-align: center;
  margin: 3% auto 4%;
  color: #5e7a7d;
  letter-spacing: 0.5rem;
}

#parent {
  display: flex;
  background-color: white;
  border-radius: 20px;
  padding: 1rem;
  margin: 0 auto 5%;
  width: 1000px;
}

/* Input Tab */

#input {
  background-color: white;
  display: flex;
  order: 1;
  padding: 0 1rem;
  margin-right: 1rem;
  flex-direction: column;
  width: 100%;
}

#input > div {
  margin-bottom: 1rem;
}

.amount {
  margin-top: 1rem;
}

.input {
  width: 96.5%;
  font-family: "Space Mono", monospace;
}

.amount > p,
.tip > p,
.number > p {
  margin: 0 0 0.5rem 0;
  font-weight: 500;
}

.tip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 1rem;
  margin-bottom: 0.5rem;
}

.tip-option {
  color: whitesmoke;
  padding: 0.5rem 0;
  border-radius: 5px;
  font-size: 1.2rem;
  font-weight: 500;
  width: 100%;
  text-align: center;
  background-color: hsl(183, 100%, 15%);
}

.tip-option-selected {
  color: #00494d;
  padding: 0.5rem 0;
  border-radius: 5px;
  font-size: 1.2rem;
  font-weight: 500;
  width: 100%;
  text-align: center;
  background-color: #27c0ab;
}

.tip-grid .tip-option-selected:hover {
  background-color: #c5e4e7;
}

.pre:hover {
  background-color: #27c0ab;
  color: #00494d;
}

#custom-tip {
  background-color: #f4fafa;
  border: none;
  color: #00494d;
  caret-color: #27c0ab;
}

.hidden-row {
  display: flex;
  margin: 0;
  padding: 0;
  justify-content: space-between;
}

.warning {
  color: red;
  visibility: hidden;
}

.number-input,
.amount-input {
  text-align: right;
  caret-color: #27c0ab;
  background-color: #f4fafa;
  font-family: "Space Mono", monospace;
  padding: 0.5rem 0.5rem;
  font-size: 1.5rem;
  border: none;
  color: #00494d;
  text-align-last: right;
}

.number-input:focus,
.amount-input:focus,
#custom-tip:focus {
  outline: 0;
  border-radius: 5px;
  box-shadow: 0 0 0 2px #27c0ab;
  /* border: 2px solid #27c0ab;
  border-radius: 5px; */
  /* box-shadow: 0 0 10px #719ece; */
}

.number-input-zero {
  text-align: right;
  caret-color: red;
  background-color: #f4fafa;
  font-family: "Space Mono", monospace;
  padding: 0.5rem 0.5rem;
  font-size: 1.5rem;
  border: none;
  color: #00494d;
  text-align-last: right;
}

.number-input-zero:focus {
  outline: 0;
  border-radius: 5px;
  box-shadow: 0 0 0 2px red;
  /* border: 2px solid #27c0ab;
  border-radius: 5px; */
  /* box-shadow: 0 0 10px #719ece; */
}

.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button,
.number-input-zero::-webkit-outer-spin-button,
.number-input-zero::-webkit-inner-spin-button,
.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button,
#custom-tip::-webkit-outer-spin-button,
#custom-tip::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

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

#output {
  background-color: #00494d;
  border-radius: 10px;
  padding: 1rem;
  order: 1;
  display: flex;
  margin-left: 1rem;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  color: whitesmoke;
}

.display {
  padding: 1rem;
}

.display-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.display-row p {
  color: #ffffee;
  font-size: 1rem;
  font-weight: 800;
}

.display-row h1 {
  color: #27c0ab;
}

.display-row-subtitle {
  color: hsl(185, 41%, 84%);
  font-size: 0.8rem;
  font-weight: 500;
}

.reset {
  text-align: center;
  font-size: 1.2rem;
  letter-spacing: 0.7rem;
  font-weight: 900;
  border: none;
  margin: 0 1rem 1rem;
  padding: 0.5rem;
  font-family: "Space Mono", monospace;
  background-color: #27c0ab;
  color: #00494d;
  border-radius: 5px;
}

.reset:hover {
  background-color: #c5e4e7;
}

footer {
  text-align: center;
  color: black;
}

@media screen and (max-width: 768px) {
  body {
    margin: 0;
    padding: 1rem;
  }

  #parent {
    display: flex;
    flex-direction: column;
    width: fit-content;
    padding: 0;
    justify-content: center;
  }

  #input {
    width: 80%;
    align-self: center;
  }

  .tip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 1rem;
    margin-bottom: 0.5rem;
    justify-content: center;
  }

  #output {
    margin-left: 0;
    width: 80%;
    align-self: center;
    margin-bottom: 2rem;
  }

  .tip-option,
  .tip-option-selected {
    align-self: center;
  }
}
