/**
 * Propcalc form styling. Currently just the one rule requested: field/result
 * symbols (e.g. "t", "G_t") render bold; units stay normal weight.
 */
.propcalc-symbol {
    font-weight: bold;
}

/* Deflection curve chart: the SVG has a fixed viewBox, so it scales down
   cleanly on narrow screens while never upscaling past its natural size. */
.propcalc-chart {
    margin-top: 1em;
    max-width: 800px;
}

.propcalc-chart svg {
    width: 100%;
    height: auto;
    display: block;
}

.propcalc-download {
    display: block;
    margin-top: 1em;
}

.propcalc-success {
    font-weight: bold;
    color: #2a7d2a;
}

/* "Results" section (see propcalc.js's buildResultsSection()): the "Span" /
   "Cantilever" sub-headings above each bulleted list. */
.propcalc-results-subheading {
    margin: 0.75em 0 0.25em;
}

/* "Calculation steps" overview (see propcalc.js's buildCalcStepsList()):
   one list item per solver iteration, each with its own small
   Checks/Calculated/Max table -- a direct port of the legacy tool's
   getResultsCalculationSteps() layout. */
.propcalc-steps {
    list-style: none;
    margin: 0.5em 0 0;
    padding: 0;
}

.propcalc-steps > li {
    margin-bottom: 1em;
}

.propcalc-step-header {
    margin: 0 0 0.25em;
    font-weight: bold;
}

.propcalc-steps table {
    border-collapse: collapse;
    width: 100%;
}

.propcalc-steps td {
    border: 0;
    padding: 0.2em 0.6em;
    text-align: right;
}

.propcalc-steps td:first-child {
    text-align: left;
}

.propcalc-check-pass {
    color: #2a7d2a;
    text-align: center !important;
}

.propcalc-check-fail {
    color: #b3261e;
    font-weight: bold;
    text-align: center !important;
}

/* Input form: two columns (slab/concrete/loads | girder), and inside each
   fieldset a label column (right-aligned) next to an input column
   (left-aligned). Each <p> row dissolves into the fieldset's grid so every
   input in a fieldset lines up. Collapses to one column on narrow screens. */
.propcalc-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
    align-items: start;
}

/* Every fieldset uses the same label-column width so all inputs line up
   across Slab geometry / Concrete / Loads & limits (Dorothee's request).
   18em fits the longest label ("Concrete cover bottom wire c (mm)"); a
   fieldset whose labels ever exceed it just grows that column instead of
   clipping. (Subgrid was tried first but doesn't work on fieldsets.) */
.propcalc-column fieldset {
    display: grid;
    grid-template-columns: minmax(18em, max-content) 1fr;
    gap: 0.6em 0.5em;
    align-items: center;
    margin: 0 0 1em;
}

.propcalc-column fieldset > p {
    display: contents;
}

.propcalc-column fieldset label {
    text-align: right;
}

.propcalc-field {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-self: start;
    max-width: 100%;
}

.propcalc-field-error {
    margin-top: 0.2em;
    color: #b3261e;
    font-size: 0.9em;
}

.propcalc-invalid {
    border-color: #b3261e;
    outline-color: #b3261e;
}

.propcalc-column fieldset input,
.propcalc-column fieldset select {
    justify-self: start;
    max-width: 100%;
}

/* Results: Span and Cantilever side by side. */
.propcalc-results-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
    align-items: start;
}

@media (max-width: 700px) {
    .propcalc-columns,
    .propcalc-results-columns {
        grid-template-columns: 1fr;
    }
}

.propcalc-example {
    margin: 0 0 1em;
}

/* Login box shown under the form to logged-out visitors. */
.propcalc-login {
    max-width: 24em;
    margin: 1em 0;
    padding: 0.75em 1em;
    border: 1px solid #c9c9c9;
    border-radius: 3px;
}

.propcalc-login p {
    margin: 0.5em 0;
}

.propcalc-form button[disabled] {
    cursor: not-allowed;
}
