main {
    height:max-content;
}

.mech-calcs-section1 { /*mech calcs left menu container*/
    height:calc(100vh - 75px);
    width:fit-content;
    background-color: var(--header-color);
    text-wrap: nowrap;
    
}
.mech-calcs-section2 {
    width:100%;
    display:flex;
    flex-direction: row;
    justify-content: center;
}
.mech-calcs-section3 {
    display:flex;
    flex-direction: column;
}
#mech_calcs_materialTable {
    
    width: fit-content;
    height: fit-content;
    
}


.calcPanel {
    display: flex;
    flex-direction: row;
    margin: auto;
}
.calcList {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 70vw;
}
.calcCard {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    cursor: pointer;
    overflow:hidden;
    min-width: 200px;
}
.calcCard img {
    max-height: 150px;
}
.calcCard span {
    margin: 10px;
    color: var(--blue-accent-color);
    font-weight: bold;
}
.calcCard p {
    font-size: 0.8em;
    max-width: 150px;
}



.calcDescription {
    font-size: 0.8em;
    text-align: center;
}



.dimensioned-input-container {
      display: inline-flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
      width: 100%;
      padding: 10px;
    }
    .dimensioned-input-wrapper {
      display: inline-flex;
      align-items: stretch;
      gap: 0;
      margin: 0;
      width: 100%;
    }

    .dimensioned-input-field {
      padding: 3px 8px;
      margin:0;
      border-radius: 10px 0 0 10px;
      width: 200px;
      height: 2em;
      font-size:1em;
      box-sizing: border-box;
    }

    .dimensioned-input-select, .lone-select {
      padding: 3px 8px;
      margin: 0;
      border-radius: 10px;
      cursor: pointer;
      height: 2em;
      font-size:1em;
      box-sizing: border-box;
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      padding-right: 24px;
      background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
      background-repeat: no-repeat;
      background-position: right 4px center;
      background-size: 16px;
    }

    .dimensioned-input-select {
        border-left: none;
        border-radius: 0 10px 10px 0;
        background-color: #FFF;
    }






.calcbox {
    width:auto;
    height:fit-content;
    text-align:left;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.calcbox-img {
    width: 550px;
    height: auto;
    max-width: 60vw;
}

.calcbox div {
    display:flex;
}

.calcbox div input,
.calcbox div output,
.calcbox div select {
    flex-grow: 1;
}
.calcbox .unitToggler {
    display: flex;
    align-self: center;
}

#GRS_section .calcbox {
    width: 40vw;
}
#GRS_dropdown {
    position: absolute;
}
#GRS_gearsetInfo {
    display: flex;
    flex-direction: column;
}
#GRS_gearsetInfo img {
    width: 80%;
    height: auto;
    margin: auto;
}
.GRS-equation-div {
    display: flex;
    flex-direction: column;
}
.use-equation-line {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.GRS-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.GRS-grid .grs-row,
.GRS-grid .grs-header {
    display: grid;
    grid-template-columns: 25fr 20px 45fr 20px 30fr 30px;
    width: 100%;
    text-align: center;
    align-items: center;
}

#GRS_equationSection .grs-row,
#GRS_equationSection .grs-header {
    grid-template-columns: 25fr 20px 45fr 20px 30fr 30px;
}

#GRS_variableSection .grs-row,
#GRS_variableSection .grs-header {
    grid-template-columns: 25fr 75fr;
}

.GRS-grid input {
    min-width: 0;          /* Allows shrinking inside grid */
    margin:5px;
}

#GRS_resultsContainer {
    width: 100%;
    height: 300px;
    border: 1px solid #aaa;
    border-radius: 10px;
    overflow-y: auto;       /* Make it scrollable */
    background: #f8f8f8;
    padding: 8px;
    font-family: monospace;
}

#GRS_resultsField {
    margin: 0;
    white-space: pre-wrap;  /* Allow line wrapping */
}


@media(max-width: 800px) {
    .mech-calcs-section2 {
        flex-direction: column;
        
    }
    .calcbox img {
        width: 100%;
        max-width: 100vw;
        max-height: 100vh;
    }

    #GRS_section .calcbox {
        width: 95%;
    }
}
