html {
    font-size: 10px; /* This will make 1rem = 10px */
}

body {
    background-color: #2e2e2e; /* Kinematics Gray background */
    font-family: 'Proxima Nova', Arial, sans-serif; /* Optional: Ensures consistent font */
}


#kinematics-calculator {
    max-width: 600px;
    border: 1px solid #ffffff; /* Kinematics Green for border */
    border-radius: 5px;
    color: #ffffff; /* White text */
    margin: 0 auto;
    padding: 20px;
    font-weight: normal;
    font-size: 1.6rem; /* Paragraph font size of 1.6em, which is 16px */
}

#kinematics-calculator h1, #kinematics-calculator h2, #kinematics-calculator h3 {
    font-family: 'Proxima Nova', Arial, sans-serif; 
    color: #ffffff;
    font-weight: bold;
    margin-top: 20px; 
    margin-bottom: 20px;
}

#kinematics-calculator h1 {
    font-size: 6rem; /* Ensure this is enforced */
    line-height: 7.5rem;
    color: #33cc59; /* Kinematics Green */
}

#kinematics-calculator h2 {
    font-size: 4.8rem;
    line-height: 6rem;
}

#kinematics-calculator h3 {
    font-size: 3.9rem;
    line-height: 5rem;
    font-weight: 600;
}

#kinematics-calculator form {
    display: flex;
    flex-direction: column; /* Arrange elements in a column */
    gap: 15px; /* Add spacing between elements */
}

#kinematics-results {
    display: none; /* Hidden initially */
    /* Remove border and padding here, so it doesn't show while hidden */
}

#kinematics-results.show {
    display: block; /* Show when class 'show' is added */
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #a7a9ab; /* Border appears only when visible */
    border-radius: 5px;
    /*background-color: #2e2e2e;*/
    color: #ffffff;
    font-family: 'Proxima Nova', Arial, sans-serif;
    font-size: 1.6rem;
    line-height: 2.4rem;
}

#kinematics-results p {
    margin: 1rem 0; /* Consistent vertical spacing */
    font-size: 1.6rem; /* Consistent with input section */
    color: #ffffff; /* White text */
}

#kinematics-feedback {
    display: none; /* Hidden by default */
    margin-top: 10px; /* Margin above feedback message */
    color: #f7b161; /* Updated color for feedback */
    font-family: 'Proxima Nova', Arial, sans-serif; /* Consistent font */
    font-size: 1.4rem; /* Slightly smaller size for feedback */
}

#kinematics-calculator {
    position: relative;
    padding-bottom: 40px; /* Add extra padding at the bottom for spacing */
}


#linkedin-link {
    position: absolute;
    bottom: 0;
    right: 0;
}

#kinematics-calculator fieldset:nth-child(4),
#kinematics-calculator fieldset:nth-child(5) {
    display: none; /* Hide some sections */
}

#kinematics-calculator fieldset {
    display: flex;
    flex-direction: column; /* Keep elements in a column */
    gap: 15px; /* Add spacing between labels and inputs */
}

#kinematics-calculator div {
    display: flex;
    justify-content: space-between; /* Space between label and input */
    align-items: center; /* Vertically center label and input */
}

#kinematics-calculator label {
    flex: 1; /* Ensures the label takes space */
    min-width: 210px; /* Set a minimum width to prevent wrapping */
    padding-right: 10px; /* Adjust as necessary for spacing */
    white-space: nowrap; /* Prevent the label from wrapping */
}

#kinematics-calculator input, #kinematics-calculator select {
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #a7a9ab; /* Light Gray border */
    border-radius: 3px;
    width: 100%;
    max-width: 100%; /* Ensure inputs don't exceed container width */
    background-color: #ffffff; /* White background for input fields */
    color: #2e2e2e; /* Text color for input/select */
    flex: 2; /* Input takes up remaining space */
    box-sizing: border-box; /* Include padding and border in width */
    height: 38px; /* Set a consistent height for both input and select elements */
}

#kinematics-calculator select {
    height: 38px; /* Ensure consistent height for select boxes */
}

#kinematics-calculator button {
    position: relative; /* Ensure it's properly positioned */
    z-index: 1; /* Make sure it’s on top of other elements */
    /*margin-top: 20px;*/
    padding: 10px;
    background-color: #f5911f; 
    color: #ffffff; /* White text */
    border: none;
    border-radius: 3px;
    cursor: pointer;
    max-width: 150px; /* Limit the button's width */
    width: 150px; /* Set a fixed width */
    margin-right: 20px; /* Add some space between the button and the link */
    font-family: 'Proxima Nova', Arial, sans-serif; /* Button text font */
    transition: background-color 0.3s ease; /* Smooth hover effect */
    font-weight: bold;
    font-size: 1.6rem;
    text-align: center; /* Center the text */
}

#kinematics-calculator button:hover {
    background-color: #f7b161; /* Darker shade for hover state */
}

#kinematics-calculator button:active {
    transform: scale(0.98); /* Slightly shrink button when pressed */
}

.component-table {
    width: 100%;
    border-collapse: collapse; /* Ensure borders are collapsed for cleaner lines */
    margin-top: 10px;
    color: #ffffff; /* Ensure text color is white */
    font-family: 'Proxima Nova', Arial, sans-serif; /* Consistent font */
    font-size: 1.6rem; /* Consistent font size */
}

.component-table th, .component-table td {
    text-align: left; /* Left-align the content */
    padding: 10px; /* Add some padding */
    border: 1px solid #a7a9ab; /* Light gray border for readability */
}

.component-table th {
    /*background-color: #333;  Darker background for header */
    font-weight: bold; /* Bold text for headers */
}

.action-row {
    display: flex;
    justify-content: space-between; /* Space between the button and the link */
    align-items: center; /* Vertically align the button and link */
    /*margin-top: 20px;  Optional: Add some spacing above */
}

#ideas-link {
    margin-left: auto; /* Push the link to the far right */
    font-size: 1.2rem; /* Small type */
    text-align: right;

}

#ideas-link a {
    color: #33cc59;
    text-decoration: none;
}

#ideas-link a:hover {
    color: #29a347;
    text-decoration: underline;
}

/* General styles for fieldset and legend */
fieldset {
    border: 1px solid #a7a9ab; /* Visible border */
    padding: 10px;
    margin: 10px 0;
    position: relative;
    width: 100%; /* Make sure the fieldset takes up the full width */
    box-sizing: border-box; /* Ensure padding doesn't affect the fieldset's width */
    border-radius: 5px; /* Optional: Adds rounded corners */
}

legend {
    padding: 0 5px; /* Adds padding around the legend text */
    display: inline-block; /* Legend takes up only necessary space */
    position: relative; /* Fixes border breaking around legend */
    font-weight: bold; /* Bold legend text */
}

/* Fix for iOS browsers where the fieldset border doesn't go all the way around */
fieldset:after {
    content: "";
    display: block;
    clear: both;
}

/* Media query for smaller screens */
@media (max-width: 480px) {
    #kinematics-calculator div {
        flex-direction: column; /* Stack label and input vertically */
        align-items: flex-start; /* Align to the left */
    }

    #kinematics-calculator label {
        min-width: 100%; /* Make label take full width */
        padding-right: 0; /* Remove right padding */
        margin-bottom: 5px; /* Add some space below the label */
    }

    #kinematics-calculator input, #kinematics-calculator select {
        width: 100%; /* Ensure input fields take full width */
        max-width: 100%; /* No fixed width */
    }

    #kinematics-calculator button {
        width: 100%; /* Make button full width */
        max-width: 100%; /* No fixed width */
    }

    /* Adjusting legend text size on smaller screens */
    legend {
        font-size: 1.6rem; /* Smaller text size on mobile */
    }
}
