/* The class check form of calculation_input_content (macros/calculation_input.html) */

/* Negative top margin of -3rem on xl screens and up */
@media (min-width: 1200px) {
    .mt-xl-n5 {
        /* 3.85 + 0.25 of the individual mt-1 */
        /* margin-top: -4.1rem !important; */
        margin-top: 0;
    }
}
/* The class check inputs: GM, t and those of the class dependent dynamic parameters the class rule uses (2 to
   4). One line of equal columns while each label fits on one line (GM's 190px: 3 columns with their gaps
   from 39rem, 4 from 52rem), else 2 per line. Without the button (class-inputs-thirds) at most a third
   each, under the columns of the rows above. A label that wraps anyway keeps its input in line.
   NOTE count the shown inputs with ~ in :has(), Chrome does not restyle on a class change for :nth-child(n of S) */
.class-inputs-area {
    container-type: inline-size;
}
.class-inputs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    column-gap: var(--bs-gutter-x);
    row-gap: .25rem;
    align-items: end;
}
.class-inputs-thirds {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
}
.class-inputs-thirds:has(> :not(.d-none) ~ :not(.d-none) ~ :not(.d-none) ~ :not(.d-none)) {
    grid-template-columns: repeat(4, 1fr);
}
@container (max-width: 39rem) {
    .class-inputs-thirds,
    .class-inputs:has(> :not(.d-none) ~ :not(.d-none) ~ :not(.d-none)) {
        grid-auto-flow: row;
        grid-template-columns: repeat(2, 1fr);
    }
}
@container (max-width: 52rem) {
    .class-inputs:has(> :not(.d-none) ~ :not(.d-none) ~ :not(.d-none) ~ :not(.d-none)) {
        grid-auto-flow: row;
        grid-template-columns: repeat(2, 1fr);
    }
}

/* The 'Pre-loaded' note right of a Load / Update button (preloaded_note); below md the button sits at the screen's
   right edge, so the note goes under it there. !important as the bootstrap position utilities */
@media (max-width: 767.98px) {
    .preloaded-text {
        position: static !important;
        display: block;
        transform: none !important;
        margin: 0.25rem 0 0 !important;
    }
}
