body {
    font-family: Arial, Helvetica, sans-serif;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.titleSection {
    text-align: center;
    width: 100%;
}

.titleBar {
    background-color: #007bff;
    width: 100%;
    padding: 15px;
}

.titleBar h1 {
    color: white;
}


.calculatorContainer {
    text-align: center;
    margin: auto;
    margin-top: 20px;
    padding-top: 20px;
    max-width: 70%;
    min-height: 500px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.outputLabel {
    font-weight: bold;
    color: #333;
}

.output {
}

#outputForm {
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

#calculateButton {
    background-color: #007bff;
    color: white;
    font-size: 1.5em;
    border-radius: 5px;
    border: none;
    width: 200px;
    margin-top: 50px;
    margin-bottom: 50px;
}

.inputFormBox {
    padding: 0 50px;
}

#inputForm {
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); 
    display: flex;
    flex-direction: column;
}

/* display three rows of inputs*/
#inputFormFields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    grid-auto-rows: minmax(auto, 1fr);
    align-items: flex-end;
    justify-content: center;
}

label {
    font-size: 0.85em;
    color: #333333;
    margin-bottom: 10px;
}

input {
    font-size: 1em;
    color: #333333;
    border: 1px solid #7f7f7f;
    border-radius: 5px;
    padding: 15px;
    width: 200px;
    max-width: 300px;
}

.inputContainer {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    text-align: left;
}

.inputFieldDiv {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
}

.inputFieldDiv input:focus {
    border-color: #007bff; 
    outline: none; 
}

#results {
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); 
    margin: auto;
    margin-top: 20px;
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    width: 70%;
}

.resultsBox {
    display: none;
    justify-content: space-between;
    margin: 20px;
}

.resultsBox.showResults {
    display: flex;
}

.outputContainerDiv {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px;
}

/* responsive media queries */
@media only screen and (max-width: 1300px) {
    #inputFormFields {
        grid-template-columns: 1fr;  /* Change to a single column */
        justify-content: center;     /* Ensure items stay centered */
        gap: 20px;                   /* Adjust spacing as needed */
    }

    .inputContainer {
        flex-direction: column; /* Stack items in the container */
        align-items: center;    /* Center items horizontally */
    }

    #results {
        width: 90%;
    }
}

@media only screen and (max-width: 600px) {

    .calculatorContainer {
        max-width: 90%;
    }

    input {
       width: 200px;
    }

    #calculateButton {
        width: 200px;
    }

    h4 {
        font-size: 0.7em;
    }

    h2 {
        font-size: 1.1em;

    }

    h1 {
        font-size: 1.5em;
    }

    label {
        font-size: 0.7em;
    }

}

@media only screen and (max-width: 500px) {
    .outputContainerDiv {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}

@media only screen and (max-width: 450px) {
    .inputForm {
        max-width: 100%;
    }


    .inputFormBox {
        padding: 0;
    }

}

@media only screen and (max-width: 300px) {
    .calculatorContainer {
        max-width: 100%;
    }

    input {
        width: 100px;
    }

    #calculateButton {
        width: 100px;
        font-size: 1em;
    }

    #results {
        width: 100%;
    }

    .inputFormBox {
        padding: 0;
    }

    body {
        max-width: 100%;
    }
}