/* == Module header (D6). Purpose/Status are hand-written; Module-Map.py --check verifies the rest. ==
   Purpose:   UI layer 242: control alignment (2026-10-12).
   Status:    active
   Loaded by: suite_look.py (directory scan)
   Replaces:  none
   History:   241, 242, 367, 469, 808, 958
   == end of module header == */
/* UI layer 242: control alignment (2026-10-12), the Proposals part.
   LF 367 / BSS 469 (2026-10-25, layer fold): the rules for other screens moved to their owners (suite-look.css, app-header-layout.css,
   files-page.css, inventory-page.css, item-create.css, log-toolbar.css, billing-page.css, user-directory.css,
   dashboard.css, checkout-dialog.css). What stays styles the Proposals page (#pr241) and folds into
   proposals241.css with the Proposals split. Loaded on every page by suite_look.py. */

/* Proposals: photo editor, catalog side panel, category adder and saved-text rows line up their boxes and buttons. */
@layer app {
    /* Proposals category list on narrow screens: Remove is as tall as the name box beside it. */
    @media(max-width:760px){}
    /* Proposals labor rows (step 6 and Settings): when a label wraps to two lines, every label in the row starts at
       the top and every box still lines up at the bottom. */

    @media(min-width:641px){
    }
    /* saved-text and labor dropdowns take the text size of the boxes beside them: 12px, or 16px at tablet and phone width */
    @media(min-width:801px){}
    @media(max-width:800px),(pointer:coarse) and (max-height:600px){}
    /* boxes in a Settings row stay one height when a long label wraps (iPad width) */

    /* labor types: the boxes match the Remove button at every width */

    /* Items: Add item is as tall as the search box beside it */

    /* ===== iPhone pass (2026-10-12): phones, held either way, and the front screen of a foldable ===== */
    @media(max-width:800px),(pointer:coarse) and (max-height:600px){
    /* LF 367 / BSS 469 (2026-10-25, layer fold): the phone size of the Proposals small print (!important, as in the rest of this layer) */

    }
    /* Proposals: the category pill gets its own line under the search box (as on Inventory) instead of shrinking to "All C..." */
    @media(max-width:600px){

    }
    /* Proposals: all six steps show at once, two-line labels, instead of a strip that cuts off at "Scop" */
    @media(max-width:640px){

     /* LF 241R56 (2026-10-15, open in a new tab): and the links */
     /* LF 241R56 (2026-10-15, open in a new tab): and the links */
    html[data-ui-page] body #pr241 .wiz :is(button,a) span{letter-spacing:-.1px } /* LF 241R56 (2026-10-15, open in a new tab): and the links */
    }
    /* fingertip-sized targets on touch screens; the extra room is invisible padding, so nothing moves */
    @media(pointer:coarse){

    }
    /* Proposals home: Catalog, the Template dropdown and New proposal are one height at every width */
    /* LF 808 / BSS 958 (2026-11-17, Engagements buttons on phone): back inside the layer (it sat below as a plain rule that no
       layered rule could change), so New is the same height as the buttons beside it in the tab row (engagements-home-row.css) */
    html[data-ui-page] body #pr241 :is(#h-catalog,#newbtn){box-sizing:border-box;min-height:42px}
}

/* priority rules. Rules above sit in the app layer; these plain rules
   win over any of them (what !important used to do), and compete with each other as before. */
html[data-ui-page] body #pr241 .edtop>:is(input,.btn) {
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
}
html[data-ui-page] body #pr241 .qtyrow>label.f>input,html[data-ui-page] body #pr241 .qtyrow>.btn {
    box-sizing: border-box;
    height: 44px;
    min-height: 44px;
}
html[data-ui-page] body #pr241 .catadd>:is(input,.btn) {
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
}
html[data-ui-page] body #pr241 .srow label.f>:is(input,button.select44) {
    box-sizing: border-box;
    height: 38px;
    min-height: 38px;
}
html[data-ui-page] body #pr241 .srow label.f>button.select44 {
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
}
@media(max-width:760px) {
    html[data-ui-page] body #pr241 .catrow>.btn {
        align-self: stretch;
        height: auto;
    }
}
html[data-ui-page] body #pr241 :is(.labrow,.ltrow)>label.f {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
@media(min-width:641px) {
    html[data-ui-page] body #pr241 .labrow>label.f>:is(input,button.select44) {
        box-sizing: border-box;
        height: 38px;
        min-height: 38px;
    }
    html[data-ui-page] body #pr241 .labrow>label.f>button.select44 {
        font-size: 12px;
        padding-top: 0;
        padding-bottom: 0;
        display: flex;
        align-items: center;
    }
}
@media(min-width:801px) {
    html[data-ui-page] body #pr241 .srow label.f>button.select44 {
        font-size: 12px;
    }
}
@media(max-width:800px),(pointer:coarse) and (max-height:600px) {
    html[data-ui-page] body #pr241 :is(.srow label.f,.labrow>label.f)>button.select44 {
        font-size: 16px;
    }
}
html[data-ui-page] body #pr241 .grid3>label.f {
    align-content: space-between;
}
html[data-ui-page] body #pr241 .ltrow>label.f>input {
    box-sizing: border-box;
    height: 38px;
    min-height: 38px;
}
html[data-ui-page] body #pr241 .pickbar {
    align-items: stretch;
}
@media(max-width:800px),(pointer:coarse) and (max-height:600px) {
    html[data-ui-page] body #pr241 small {
        font-size: 12px;
    }
}
@media(max-width:600px) {
    html[data-ui-page] body #lf-topbar.pr241-header #ops-header-controls {
        flex-wrap: wrap;
    }
    html[data-ui-page] body #lf-topbar.pr241-header #ops-header-controls>.search-control {
        flex: 1 1 100%;
    }
    html[data-ui-page] body #lf-topbar.pr241-header #ops-header-controls>.category-control {
        flex: 0 0 auto;
        max-width: 100%;
    }
}
@media(max-width:640px) {
    html[data-ui-page] body #pr241 .wiz ol {
        display: grid;
        grid-template-columns: repeat(6,minmax(0,1fr));
        overflow: visible;
        gap: 0;
        padding: 4px;
    }
    html[data-ui-page] body #pr241 .wiz li {
        min-width: 0;
        display: flex;
    }
    html[data-ui-page] body #pr241 .wiz :is(button,a) {
        flex: 1 1 auto;
        padding: 5px 0;
        min-height: 56px;
        justify-content: flex-start;
    }
    html[data-ui-page] body #pr241 .wiz :is(button,a)[aria-current="step"] {
        border-color: transparent;
    }
    html[data-ui-page] body #pr241 .wiz :is(button,a) span {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.15;
        font-size: 11px;
    }
}
@media(pointer:coarse) {
    html[data-ui-page] body #pr241 .itip {
        padding: 7px;
        margin: -7px -7px -7px -1px;
        box-sizing: content-box;
    }
    html[data-ui-page] body #pr241 button.handle {
        padding: 7px;
        margin: -3px -5px;
    }
    html[data-ui-page] body #pr241 :is(.chips,.quick) button {
        min-height: 32px;
    }
    html[data-ui-page] body #pr241 #d-spectext {
        padding-top: 7px;
        padding-bottom: 7px;
        margin-top: -7px;
        margin-bottom: -7px;
    }
}
html[data-ui-page] body #pr241 .newrow label.f>button.select44 {
    box-sizing: border-box;
    height: 42px;
    min-height: 42px;
}
