.bmicalc {
width: 100%;
margin-top: 10px;
display: flex;
flex-wrap: wrap;
}
.toggle-buttons {
    display: flex;
}
.unit-button {
    padding: 5px;
    border: 1px solid #ccc;
    background-color: grey;
    cursor: pointer;
    transition: background-color 0.3s;
}
.unit-button:first-child {
    border-radius: 5px 0 0 5px;
}
.unit-button:last-child {
    border-radius: 0 5px 5px 0;
}
.unit-button.active {
    background-color: #007bff;
    color: white;
}
#bmi-form {
    width: 35%;
    margin-left: 0px;
    background-color: #fff;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
label {
    margin-bottom: 2px;
    font-size: 17px;
    font-weight: 500;
}
.imperical-height {
    display: flex; /* Use Flexbox to align children in a row */
    gap: 5px; /* Optional: adds space between the divs */
}
input[type="number"], select {
    width: 100%;
    padding: 8px;
    font-size: 16px;
    border: 2px solid #b8b8b8;
    border-radius: 4px;
    margin-bottom: 5px;
}
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0; 
}
#bmi-result {
    width: 60%;
    margin-left: 5%;
    background-color: #fff;
    padding: 5px;
    
}
#bmi-result h2 {
    color: green;
    background-color: #ddd;
    padding: 5px;
}
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}
.error {
    color: red;
}
.bmi-draw {
   padding: 10px 0px 10px 0px;
   text-align:center;
}
.button-group {
    display: flex;
    gap: 5px;
    width: auto;
}
.button-group #clear-btn {
    width: 40%;
    color: red;
}

button {
    background-color: #3498db;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 17px;
    margin-top: 10px;
}
button:hover {
    background-color: #2980b9;
}

@media (max-width: 1008px){
    #bmi-form {
        width: 38%;
        margin-left: -3%;
    }
    #bmi-result {
        width: 62%;
        margin-left: 3%;
    }

}
@media (max-width: 764px) {
    #bmi-form {
        width: 35%;
        margin-left: 0%;
    }
}
@media (max-width: 570px) {
    #bmi-form {
        display: block;
        width: 250px;
        margin: 0 auto; 
        max-width: 100%;
        box-shadow: none;
    }
    input[type="number"], select {
        width: 100%;
        padding: 4px;
        margin-bottom: 1px;
    }
    #bmi-result {
        width: 100%;
        padding: 0px;
        margin: 0px;
    }
    .bmi-draw {
        margin-left: -15px;

     }
    .results-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 5px;
    }
}