@font-face {
    font-family: 'PlusJakartaSans';
    src: url(./assets/fonts/PlusJakartaSans-VariableFont_wght.ttf);
}

@font-face {
    font-family: 'PlusJakartaSansbold';
    src: url(./assets/fonts/static/PlusJakartaSans-Bold.ttf);
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-family: 'PlusJakartaSans';
}

body {
    background-color: hsl(202, 86%, 94%);
}

.container {
    display: flex;
    /* border: solid black; */
    margin: auto;
    width: 60dvw;
    margin-top: 3rem;
    /* border-radius: 15px; */
    background-color: hsl(0, 0%, 100%);
    border-radius: 25px;
}

form {
    display: flex;
    flex-direction: column;
    flex-basis: 50%;
    gap: 2rem;
    background-color: hsl(0, 0%, 100%);
    padding: 4% 4%;
    border-top-left-radius: 25px;
    border-bottom-left-radius: 50px;
}

.Mortgage-calculator {
    display: flex;
    align-items: center;
    justify-content: space-between;

    h2 {
        color: hsl(202, 55%, 16%);
    }

}

.mortgage-amount-holder {
    display: flex;
    justify-content: center;
    width: 100%;
    border: solid 1px hsl(200, 24%, 40%);
    border-radius: 5px;
}

.mortgage-amount-holder span {
    width: 15%;
    font-size: 20px;
    font-weight: bold;
    background-color: hsl(202, 86%, 94%);
    color: hsl(200, 24%, 40%);
    padding: 1% 4%;
    text-align: center;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;

}

.amount {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;

    label {
        color: hsl(202, 55%, 16%);
    }


}

#clear-all {
    text-decoration: underline;
    cursor: pointer;
    color: hsl(200, 24%, 40%);
}

#clear-all:hover {
    color: hsl(202, 55%, 16%);
}

.amount input {
    width: 85%;
    height: 2.4rem;
    border-radius: 5px;
    border: none;
    background-color: white;
    padding: 0% 2%;
    color: hsl(202, 55%, 16%);
}

.mortgage-amount-holder:hover {

    border-top:solid 2px hsl(202, 55%, 16%);
    border-left: solid 2px hsl(202, 55%, 16%);

    input {
        cursor: pointer;
    }
}

.mortgage-amount-holder:active {
    border-color: hsl(61, 70%, 52%);

    span {
        background-color: hsl(61, 70%, 52%);
    }

    input {
        border-color: hsl(61, 70%, 52%);
    }
}

.motrgage-ammout-error {
    display: none;
    color: red;
}

.term-rate {
    display: flex;
    gap: 0.7rem;
    width: 100%;

}

.mortgage-term {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-radius: 5px;
    width: 100%;

    label {
        color: hsl(202, 55%, 16%);
    }
}

.mortgage-term input {
    width: 65%;
    height: 2.2rem;
    border: none;
    padding: 0% 2%;
    color: hsl(202, 55%, 16%);
}

.motrgage-term-error {
    display: none;
    color: red;
}

.motrgage-rate-error {
    display: none;
    color: red;
}

.mortgage-term-holder {
    display: flex;
    justify-content: center;
    width: 100%;
    border: solid 1px hsl(200, 24%, 40%);
    border-radius: 5px;
}

.mortgage-term-holder span {
    width: 35%;
    font-size: 17px;
    font-weight: bold;
    background-color: hsl(202, 86%, 94%);
    color: hsl(200, 24%, 40%);
    padding: 1% 4%;
    text-align: center;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;

}

.interest-rate-holder {
    display: flex;
    justify-content: center;
    width: 100%;
    border: solid 1px hsl(200, 24%, 40%);
    border-radius: 5px;
}

.interest-rate-holder span {
    width: 35%;
    font-size: 17px;
    font-weight: bold;
    background-color: hsl(202, 86%, 94%);
    color: hsl(200, 24%, 40%);
    padding: 1% 4%;
    text-align: center;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;

}

.mortgege-type {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    p {
        color: hsl(202, 55%, 16%);
    }
}

.radio {
    width: 100%;
    height: 2.5rem;
    border: solid 1px hsl(200, 24%, 40%);
    border-radius: 5px;
    padding: 2% 4%;

    label {
        color: hsl(202, 55%, 16%);
        font-weight: bolder;
    }
}

.radio:hover {
    cursor: pointer;
    border-color: hsl(61, 70%, 52%);
}

.radios {
    accent-color:  hsl(61, 70%, 52%);
    margin-right: 0.7rem;
}

.motrgage-type-error {
    display: none;
    color: red;
}

.errordisplay {
    display: block;
}

button {
    display: flex;
    width: 60%;
    height: 2.5rem;
    border-radius: 1.5rem;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: hsl(61, 70%, 52%);
    color: hsl(202, 55%, 16%);
    font-weight: bolder;

}

button:hover {
    opacity: 0.7;
    cursor: pointer;
}

article {
    display: flex;
    flex-direction: column;
    flex-basis: 50%;
    align-items: center;
    justify-content: center;
    background-color: hsl(202, 55%, 16%);
    padding: 0% 2%;
    border-top-right-radius: 25px;
    border-bottom-right-radius: 25px;
    border-bottom-left-radius: 55px;


}

.empty-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;

}

.result-shown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;

    p {
        width: 100%;
        text-align: center;
        color: hsl(203, 41%, 72%);
        font-size: 13px;
    }

    h3 {
        color: white;
    }
}

.completed-result {
    display: flex;
    flex-direction: column;
    padding: 0% 4%;
    gap: 2rem;
    display: none;
    align-self: flex-start;
    margin-bottom: 4rem;

}

.result {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: white;

    p {
        color: hsl(203, 41%, 72%);
        font-size: 13px;
        line-height: 1.3rem;

    }

}

.monthly-repayment {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background-color: hsl(202, 58%, 10%);
    padding: 6% 4%;
    color: white;
    border-radius: 7px;
    border-top: solid 4px hsl(61, 70%, 52%);

    P {
        color: hsl(203, 41%, 72%);
    }
}

#screen {
    font-size: 50px;
    color: hsl(61, 70%, 52%);
    font-family: 'PlusJakartaSansbold';
}

#Second-screen {
    color: white;
}

@media screen and (max-width: 767px) {
    .container {
        display: flex;
        flex-direction: column;
        width: 80dvw;
        border-radius: 0;
    }

    form {
        border-radius: 0;
        padding: 6% 6%;
    }

    article {
        border-radius: 0;
    }

    .empty-result {
        padding-top: 1rem;
    }

    .completed-result {
        margin-bottom: 1rem;
        padding-top: 7%;
    }

    .Mortgage-calculator {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .term-rate {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .mortgage-term input {
        width: 80%;
    }

    .mortgage-term-holder span {
        width: 20%;
        padding: 1% 1%;
    }

    .interest-rate-holder span {
        width: 20%;
    }

    button {
        width: 100%;
    }

}