* {
    box-sizing: border-box;
    font-family: "Plus Jakarta Sans", sans-serif;
}

:root {
--Lime:hsl(61, 70%, 52%);
--Red:hsl(4, 69%, 50%);
--White:hsl(0, 0%, 100%);
--Slate100: hsl(202, 86%, 94%);
--Slate300: hsl(203, 41%, 72%);
--Slate500: hsl(200, 26%, 54%);
--Slate700: hsl(200, 24%, 40%);
--Slate900: hsl(202, 55%, 16%);
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
}


main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--Slate100);
}
#mainContainer {
    width: 60rem;
    display: flex;
    background-color: var(--White);
    border-radius: 1rem;
}
#mortgageContainer, #resultsContainer {
    width: 50%;
    padding: 2rem;
}
#mortgageContainer {
    background-color: var(--White);
    border-radius: 1rem;

}
#resultsContainer {
    background-color: var(--Slate900);
    border-radius: 0 1rem 1rem 5rem;
    color: var(--Slate300);
    display: flex;
    flex-direction: column;
}
.topHeadButton {
    display: flex;
    justify-content: space-between;
}

#clearBtn {
cursor: pointer;
}


h3 {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--Slate500);
    padding-top: 2rem;
}

.inputContainer1, .inputContainer2, .inputContainer3 {
    display: flex;
    border: 1px solid var(--Slate300);
    border-radius: 0.5rem;
    width: 100%;
    margin: 0.5rem 0 0.5rem 0;
    overflow: hidden;

}


.inputContainer1:hover .durLabel, .inputContainer2:hover .intLabel, .inputContainer3:hover .amountLabel{
    background-color: var(--Lime);
}
.inputContainer1:hover,.inputContainer2:hover , .inputContainer3:hover {
    border: 1px solid var(--Lime);
}

#line {
    border: 0.1px solid var(--Slate700);
}

label, h2 {
    text-align: left;
    font-size: 1rem;
    margin: 0.3rem 0 0.65rem 0;
    font-weight: 500;
    color: var(--Slate500);
}

#inlineWrapInputs {
    display: flex;
    gap: 1rem;
}

input {
    width: 100%; 
    padding: 1rem;
    border: transparent;
    outline: transparent;
    border-radius: inherit;
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    cursor: text;
 }
 

.topHeadButton h1 {
    font-size: 1.2rem;
    color: black;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 2.5rem;
}
.topHeadButton h2 {
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: underline;
    color: var(--Slate700);
    margin-top: 0;
     
}
.intLabel, .durLabel, .amountLabel {
    background-color: var(--Slate100);
    display: flex;
    align-items: center;
    padding: 1rem;
    font-weight: 700;
    color: var(--Slate500);
    font-size: 1rem;
}



#calButton {
    display: flex;
    gap: 0.5rem;
    border: none;
    background-color: var(--Lime);
    border-radius: 2rem;
    padding: 0.75rem 2rem 0.75rem 2rem;
    font-size: 0.9rem;
    font-weight: 700;
    width: 17rem;
    cursor: pointer;
    margin-top: 1rem;
}
#calButton:hover {
    opacity: 0.5;
}

button span {
    align-self: flex-end;
}
#calButton img {
    width: 1.2rem;
    height: auto;
}

#resultsContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#resultsContainer img {
    margin: auto auto 1rem auto;
}
#resultsContainer h1 {
    margin: 0;
    color: var(--Slate100);
    font-size: 1.6rem;
    font-weight: 500;
    text-align: left;
}
#resultsContainer p {
    font-size: 1rem;
    font-weight: 100;
    text-align: center;
    margin-bottom: 1rem;
    line-height: 25px;
}

.monthlyAmount {
    color: var(--Lime);
    font-size: 3rem;
    font-weight: 500;
    padding-bottom: 2rem;
}
.totalAmount {
    color: white;
    font-size: 1.5rem;
}

#typeContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#typeContainer span {
    font-weight: 700;
    color: var(--Slate900);
}
/* Disclaimer, I used help from chatGPT for the creation of the radio buttons  */
/* Create a custom radio button */

.custom-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0.5rem; /* Add margin between radio buttons */
    border: 1px solid var(--Slate300);
    padding: 1rem;
    border-radius: 0.2rem;
}
.custom-radio:hover {
    border: 1px solid var(--Lime);
}
ama
.custom-radio:focus-within {
    background-color: rgba(215, 218, 47, 0.2);
    border-color: var(--Lime)
}

.custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-radio .checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    padding: 0.5rem;
    border: 2px solid var(--Lime);
    border-radius: 50%; /* Make it round */
    margin-right: 10px; /* Add space between the radio button and label text */
    position: relative;
}

.custom-radio .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 3px;
    top: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%; /* Make the inner circle round */
    background: var(--Lime);
}

.custom-radio input:checked + .checkmark:after {
    display: block;
}

label:focus {
    background-color: pink;
}

#calculationWrap {
    flex-direction: column;
    background-color: var(--Slate900);
    color: var(--White);
    text-align: center;
    width: 50%;
    border-radius: 0 1rem 1rem 5rem;
    display: block;

}
#calculationWrap p {
    color: var(--Slate300);

}
#calculationWrap img {
    margin-top: 8.5rem;
    width: auto;
    height: 10rem;
}
#resultsContainer {
    display: none;
}

#resultsContainer p {
    text-align: left;
    margin-bottom: 2rem;
}

#resultsContainer h2 {
    text-align: left;
    font-size: 1rem;
}
.repaymentContainer {
    width: 100%;
    height: 20rem;
    background-color: hsl(202, 56%, 12%);
    border-radius: 0.5rem;
    border-top: 5px solid var(--Lime);
    padding: 1.5rem;
    margin-bottom: auto;
}
.error {
    border-color: red;
    background-color: red;
    color: white;
}


.errorMsg {
    visibility: hidden;
    font-size: 0.8rem;
    color: var(--Red);
    margin-top: 0;
}
@media only screen and (max-width: 600px) {
    #mainContainer, #inlineWrapInputs {
      flex-direction: column;
    }
    #mortgageContainer, #resultsContainer {
        width: 100%;
        border-radius: 0;
    }
    #calButton {
        width: 100%;
       
    }
    #calculationWrap {
    width: 100%;
    border-radius: 0;
  } 
  #calculationWrap p {
    margin: 0 1rem 0 1rem;
    padding-bottom: 2rem;
  }
   #calculationWrap img {
    margin: 2rem 0 0 0;
   }
   .topHeadButton {
    flex-direction: column-reverse;
   }
   .topHeadButton h1 {
    margin-bottom: 1rem;
   }
   #clearBtn {
    margin-bottom: 2rem;
   }

  } 

