body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Plus Jakarta Sans", sans-serif;
  justify-content: center;
  align-items: center;
  background-color: hsl(203, 41%, 72%);
}
.container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background-color: hsl(0, 0%, 100%);
  margin: 15rem;
  border-radius: 1rem;
  max-width: 900px;
  width: 90%;
}
.item1 {
  background-color: hsl(0, 0%, 100%);
  padding: 1.5rem;
  border-top-left-radius: 1rem;
  border-bottom-left-radius: 1rem;
}
.headers {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1rem;
}
.heading {
  color: hsl(202, 55%, 16%);
  font-size: 1.3rem;
  font-weight: 700;
}
.clear-all {
  color: hsl(200, 24%, 40%);
  text-decoration: underline;
  cursor: pointer;
}

.mortgage-amt-div {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}
.amt-label {
  color: hsl(200, 24%, 40%);
  padding-bottom: 0.5rem;
}
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid hsl(200, 26%, 54%);
  border-radius: 0.5rem;
}
.currency-symbol {
  left: 1;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  background-color: hsl(202, 86%, 94%);
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
  z-index: 1;
  box-sizing: border-box;
  color: hsl(200, 24%, 40%);
  font-weight: 600;
  height: 100%;
}
.currency-symbol.error {
  color: white;
  background-color: hsl(4, 69%, 50%);
}
.error-state {
  color: hsl(4, 69%, 50%);
  font-size: 14px;
  margin-bottom: 0;
  font-weight: 600;
  margin-top: 0.2rem;
  display: none;
}
.amt-input {
  padding: 0.5rem 0 0.5rem 3rem;
  border-radius: 0.5rem;
  outline: none;
  width: 90%;
  font-size: 1rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  background-color: transparent;
  border: none;
}

.term-rate-div {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 1rem;
  gap: 20px;
}
.term-label,
.rate-label {
  color: hsl(200, 24%, 40%);
  margin-bottom: 0.5rem;
  display: block;
}
.term-input,
.rate-input {
  border: none;
  outline: none;
  width: 80%;
  font-size: 1rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  background-color: transparent;
  padding: 0.5rem;
  gap: 10px;
  padding-right: 0.2em;
}
.term-input-wrapper,
.rate-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid hsl(200, 26%, 54%);
  border-radius: 0.5rem;
}
.years {
  text-align: center;
  right: 0;
  top: 2;
  width: 30%;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 1rem;
  background-color: hsl(202, 86%, 94%);
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  box-sizing: border-box;
  height: 100%;
  pointer-events: none;
  margin-right: 0;
  z-index: 1;
  color: hsl(200, 24%, 40%);
  font-weight: 600;
}
.years.error {
  color: white;
  background-color: hsl(4, 69%, 50%);
}
.rate {
  text-align: center;
  right: 0;
  top: 2;
  width: 30%;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 0.75rem;
  background-color: hsl(202, 86%, 94%);
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  box-sizing: border-box;
  height: 100%;
  pointer-events: none;
  margin-right: 0;
  z-index: 1;
  color: hsl(200, 24%, 40%);
  font-weight: 600;
}
.rate.error {
  color: white;
  background-color: hsl(4, 69%, 50%);
}
.mortgage-type-div {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
}
.mortgage-type-div p {
  color: hsl(200, 24%, 40%);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: 0;
}
.repayment-div,
.interest-only-div {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 1px solid hsl(200, 26%, 54%);
  border-radius: 0.3rem;
  margin: 0 0 1rem 0;
  cursor: pointer;
}
#repayment,
#interest-only {
  height: 2.5rem;
}
.repayment-label,
.interest-only-label {
  color: hsl(202, 55%, 16%);
  font-weight: 600;
  padding: 0.6rem;
}
.btn-div {
  margin-top: 0.7rem;
}
.calculate-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: hsl(61, 70%, 52%);
  border: none;
  height: 3rem;
  width: 250px;
  border-radius: 5rem;
  gap: 1rem;
  color: hsl(202, 55%, 16%);
  font-weight: 700;
  cursor: pointer;
}
.item2 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background-color: hsl(202, 55%, 16%);
  border-top-right-radius: 1rem;
  border-bottom-right-radius: 1rem;
  border-bottom-left-radius: 5rem;
}
.item2-h1 {
  color: hsl(0, 0%, 100%);
  font-size: 1.2rem;
  margin-bottom: 0;
  text-align: center;
}
.item2 .item2-p {
  display: flex;
  align-items: center;
  font-size: 1rem;
  text-align: center;
  color: hsl(200, 26%, 54%);
  padding: 1rem;
}

.input-wrapper:focus-within {
  border-color: hsl(61, 70%, 52%);
}
.input-wrapper:focus-within .currency-symbol {
  background-color: hsl(61, 70%, 52%);
  color: hsl(202, 55%, 16%);
  font-weight: 600;
}
.amt-input:focus {
  color: hsl(202, 55%, 16%);
  font-weight: 600;
}
.amt-input:not(:placeholder-shown) {
  color: hsl(202, 55%, 16%);
  font-weight: 600;
}
.rate-input:focus-within,
.term-input:focus-within {
  color: hsl(202, 55%, 16%);
  font-weight: 600;
}
.rate-input:not(:placeholder-shown),
.term-input:not(:placeholder-shown) {
  color: hsl(202, 55%, 16%);
  font-weight: 600;
}
.repayment-div:has(input[type="radio"]:focus),
.repayment-div:has(input[type="radio"]:checked) {
  border-color: hsl(61, 70%, 52%);
  background-color: hsl(202, 86%, 94%);
}
.repayment-div:has(input[type="radio"]:focus),
.interest-only-div:has(input[type="radio"]:checked) {
  border-color: hsl(61, 70%, 52%);
  background-color: hsl(61, 70%, 52%, 40%);
  accent-color: hsl(61, 70%, 52%);
}
.hidden {
  display: none;
}
.results {
  background-color: hsl(201, 66%, 10.4%);
  border-radius: 1rem;
  border-top: 2px solid hsl(61, 70%, 52%);
  padding: 2rem;
  color: hsl(203, 41%, 72%);
  display: flex;
  flex-direction: column;
  width: 80%;
}
.item2-h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.item2-p {
  margin-bottom: 1rem;
  justify-content: justify;
}
#monthly {
  color: hsl(61, 70%, 52%);
  font-weight: 800;
  font-size: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid hsl(0, 0%, 100%);
}
#total {
  color: hsl(0, 0%, 100%);
  font-weight: 700;
  font-size: 2rem;
}
