@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Poppins&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap");

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
:root {
  --backgroundColor: hsl(192, 100%, 91%);
  --darkCyan: hsl(183, 100%, 15%);
  --darkgrayishCyan: hsl(186, 14%, 43%);
  --grayishCyan: hsl(184, 14%, 56%);
  --lightGrayishCyan: hsl(185, 41%, 84%);
  --veryLightGrayishCyan: hsl(189, 41%, 97%);
  --strongCyan: hsl(172, 67%, 45%);
  --poppins: "Poppins", sans-serif;
  --openSans: "Open Sans", sans-serif;
  --spaceMono: "Space Mono", monospace;
}
body {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  justify-content: center;
  place-items: center;
  background-color: var(--backgroundColor);
  font-family: var(--spaceMono);
}
.letter-container {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.letter-container > p {
  font-size: 1.2rem;
  font-weight: 600;
  color: hsl(182, 100%, 20%);
}
.container {
  max-width: 650px;
  min-width: 300px;
  min-height: fit-content;
  background-color: white;
  padding: 2rem;
  display: flex;
  gap: 2rem;
  border-radius: 15px;
}
input {
  direction: rtl;
  width: 100%;
  height: 30px;
  padding: 10px;
  border-radius: 3px;
  border: 0px;
  background-color: #f3f8fb;
}
input:hover,
input:active {
  border: 2px solid;
  border-color: var(--strongCyan);
}
input::placeholder {
  color: var(--grayishCyan);
  font-family: var(--spaceMono);
  font-size: 1.1rem;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}
.input-wrapper {
  display: block;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
span {
  position: absolute;
  left: 10px;
}

.input-container {
  width: 50%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 10px 0px;
}
.input-inSection {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.label-cont {
  display: flex;
  justify-content: space-between;
}
.input-inSection label,
.input-inSection .label-cont {
  font-size: 11px;
  color: var(--darkgrayishCyan);
  font-weight: 600;
}
#bill-error-msg {
  color: rgb(255, 30, 30);
  display: none;
}
#people-error-msg {
  color: rgb(255, 30, 30);
  display: none;
}
.input-wrapper > input {
  color: var(--darkCyan);
  font-family: var(--spaceMono);
  font-size: 1.1rem;
  font-weight: 600;
}
.btn-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.btn-container > button {
  padding: 7px 12px;
  font-size: 14px;
  font-family: var(--spaceMono);
  font-weight: 600;
  background-color: var(--darkCyan);
  color: white;
  border: 0px;
  border-radius: 3px;
  cursor: pointer;
}
.btn-container > button:hover {
  background-color: var(--strongCyan);
  color: var(--darkCyan);
}
#custom-input {
  max-width: 100px;
  height: 35px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--darkCyan);
}
#custom-input::placeholder {
  font-size: 1rem;
  font-weight: 600;
  color: var(--darkgrayishCyan);
  margin: 0 auto;
}

.result-container {
  width: 50%;
  padding: 1.5rem;
  background-color: var(--darkCyan);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.result-container .upper-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.result-container .tip-amount-sec {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.result-container .tip-amount-sec h1 {
  color: var(--strongCyan);
}

.result-container .tip-amount-sec h3 {
  color: var(--lightGrayishCyan);
}
.result-container .tip-amount-sec h4 {
  color: var(--grayishCyan);
}
.result-container .tip-amount-sec .tip-labels {
  font-size: 0.6rem;
}
.result-container button {
  padding: 7px 12px;
  font-family: var(--spaceMono);
  font-size: 14px;
  font-weight: 700;
  border: 0px;
  border-radius: 5px;
  cursor: pointer;
}

.result-container button:hover {
  background-color: var(--backgroundColor);
}

.reset-btn-inactive {
  background-color: hsl(182, 100%, 20%);
  color: var(--darkCyan);
}

.reset-btn-active {
  background-color: var(--strongCyan);
}

/* Media-queries */
@media only screen and (max-width: 650px) {
  body {
    overflow-y: scroll;
    gap: 1rem;
  }
  .container {
    min-width: 350px;
    min-height: fit-content;
    flex-direction: column;
  }
  .input-container,
  .result-container {
    width: 100%;
  }
  .btn-container {
    grid-template-columns: repeat(2, 1fr);
  }
  #custom-input {
    min-width: 100%;
  }
  #custom-input::placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  #reset-btn {
    margin-top: 1.5rem;
  }
}
@media only screen and (max-width: 425px) {
  .container {
    min-width: 100%;
  }
}
