@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

* {
    margin: 0;
    padding: 0;
}

body {
    background-color: hsl(202, 86%, 94%);
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.calculation-container {
    background-color: #ffffff;
    display: flex;
    align-items: center;
    height: 80%;
    width: 60%;
}

.calculator {
    padding: 2rem;

    width: 50%;
    height: 80%;
}

h2 {
    color: hsl(202, 55%, 16%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

label {
    font-size: .6em;
    color: hsl(200, 24%, 40%);
    margin: 0 .3rem 0 .3rem;
}

.clear {
    font-weight: lighter;
    font-size: .5em;
    text-decoration: underline;
    color: hsl(200, 24%, 40%);
    cursor: pointer;
}

.input-group {
    display: flex;
    align-items: center;
    border: 1px solid hsl(200, 24%, 40%);
    border-radius: 5px;
    margin: .2rem .2rem 0.2rem;
}

.flex {
    display: flex;
    align-items: center;
}

#amount,
#term,
#interest {
    border: none;
    margin: .5em;
    width: 100%;
}

.amount,
.term,
.interest {
    padding: 8px;
    background-color: hsl(202, 86%, 94%);
    color: hsl(200, 24%, 40%);
}

#amount,
#term,
#interest:focus {
    outline: none;
    color: hsl(202, 55%, 16%);

}

#amount {
    font-size: .8em;
    font-weight: bold;
}

#amount-error,
#term-error,
#interest-error,
#option-error {
    color: red;
    font-size: 11px;
}



h5 {
    margin-top: 1rem;
    margin-bottom: .3rem;
    font-weight: lighter;
    font-size: .6em;
}

.radio-option {
    display: flex;
    align-items: center;
    border: 1px solid hsl(200, 24%, 40%);
    padding: .6rem;
    margin: .4rem 0 .1rem 0;
    border-radius: 5px;
}



.repayment,
.interest-only {
    cursor: pointer;
    margin-right: 1rem;
}


.repayment-label,
.interest-label {
    font-size: .8em;
    font-weight: bold;
}

button {
    padding: 10px;
    width: 100%;
    border-radius: 10px;
    border: none;
    background-color: hsl(61, 70%, 52%);
    color: hsl(202, 55%, 16%);
    font-weight: bold;
    cursor: pointer;
    margin-top: 1.5rem;
}




button .icon {
    margin-right: 5px;
}


.results {
    width: 50%;
    background-color: hsl(202, 55%, 16%);
    padding: 2rem;
    width: 50%;
    height: 87%;
    border-bottom-left-radius: 50px;
}

h3 {
    color: hsl(202, 86%, 94%);

}

.results p {
    color: hsl(200, 24%, 40%);
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.results>p {
    font-size: 1.1em;
    margin-bottom: 2rem;
}

.results h1 {
    color: hsl(61, 70%, 52%);
}

.results h2 {
    color: hsl(202, 86%, 94%);
}

.result-box {
    margin-bottom: 1rem;
    display: block;
    margin: 0 auto;
    width: 90%;
    background-color: hsl(200, 64%, 11%);
    padding: .8rem;
    border-radius: 10px;
    border-top: 4px solid hsl(61, 70%, 52%);
}

.result-box hr {
    margin: .5rem 0 .5rem 0;
    border: 1px solid hsl(200, 24%, 40%);

}

.attribution {
    font-size: 11px;
    text-align: center;
    margin-top: 1.5rem;
}

.attribution a {
    color: hsl(228, 45%, 44%);
}

/* Mobile version adjustments */
@media screen and (max-width: 480px) {
    body {
        height: auto;
        padding: 1rem;
    }

    .calculation-container {
        width: 100%;
        height: auto;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }

    .calculator,
    .results {
        width: 100%;
        height: auto;
        padding: 1rem;
    }

    h2 {
        font-size: 1.2rem;
        justify-content: center;
    }

    .input-group {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 1rem;
    }

    #amount,
    #term,
    #interest {
        margin: 0.5rem 0;
        width: 100%;
    }

    button {
        margin-top: 1rem;
        width: 100%;
    }

    .result-box {
        width: calc(100% - 2rem);
        /* Adjust width to account for padding */
        margin: 0 auto;
        border-radius: 0;
    }

    .results {
        margin-top: 1rem;
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
}