/* ComiX Store UX2026 v3.6.163 — 023 Purchase Proposals containment/alignment
 * Presentation-only. The 023 remains owner of proposal data, workflow and actions.
 */

/* The generic My Account skin must not add a second frame around the 023 form. */
body.woocommerce-account .woocommerce-MyAccount-content .cofh-proposal-detail-form{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:visible!important;
}

/* Give this operational endpoint a little more usable center space. */
body.woocommerce-account .woocommerce-MyAccount-content:has(.cofh-proposal-detail-form){
    padding:20px 22px 26px!important;
    overflow-x:auto!important;
}

/* Restore the table contract owned by 023 after the generic account-table skin. */
body.woocommerce-account .woocommerce-MyAccount-content .cofh-proposal-detail-table{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    border-collapse:collapse!important;
    border-spacing:0!important;
    table-layout:fixed!important;
}
body.woocommerce-account .woocommerce-MyAccount-content .cofh-proposal-detail-table th{
    padding:12px 9px!important;
    vertical-align:middle!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
}
body.woocommerce-account .woocommerce-MyAccount-content .cofh-proposal-detail-table td{
    padding:14px 9px!important;
    vertical-align:middle!important;
    min-width:0!important;
    overflow-wrap:anywhere!important;
}

/* The action columns must reserve enough real space; product absorbs the remainder. */
@media (min-width:901px){
    body.woocommerce-account .cofh-proposal-detail-table col.cofh-c-select{width:74px!important}
    body.woocommerce-account .cofh-proposal-detail-table col.cofh-c-product{width:auto!important}
    body.woocommerce-account .cofh-proposal-detail-table col.cofh-c-price{width:82px!important}
    body.woocommerce-account .cofh-proposal-detail-table col.cofh-c-qty{width:62px!important}
    body.woocommerce-account .cofh-proposal-detail-table col.cofh-c-total{width:82px!important}
    body.woocommerce-account .cofh-proposal-detail-table col.cofh-c-confirm{width:112px!important}
    body.woocommerce-account .cofh-proposal-detail-table col.cofh-c-delete{width:112px!important}

    body.woocommerce-account .cofh-proposal-detail-table .cofh-proposal-row-button{
        display:flex!important;
        width:100%!important;
        min-width:0!important;
        max-width:100%!important;
        height:42px!important;
        min-height:42px!important;
        margin:0!important;
        padding:0 7px!important;
        box-sizing:border-box!important;
        white-space:normal!important;
        text-align:center!important;
        line-height:1.05!important;
        font-size:10px!important;
    }

    /* Bottom bar mirrors the same effective column geometry instead of percentages
       that become too narrow inside the three-column My Account shell. */
    body.woocommerce-account .cofh-proposal-bulkbar{
        grid-template-columns:74px minmax(210px,1fr) 82px 62px 82px 112px 112px!important;
        min-height:70px!important;
        margin-top:18px!important;
    }
    body.woocommerce-account .cofh-proposal-bulk-select{
        grid-column:1!important;
        padding:10px 6px!important;
        gap:6px!important;
        justify-content:center!important;
        text-align:center!important;
        line-height:1.05!important;
        font-size:10px!important;
    }
    body.woocommerce-account .cofh-proposal-bulk-add{
        grid-column:2 / span 4!important;
        justify-self:start!important;
        margin:0 0 0 10px!important;
        min-width:0!important;
    }
    body.woocommerce-account .cofh-proposal-bulk-add .button{
        width:auto!important;
        max-width:100%!important;
        min-height:42px!important;
        padding:0 14px!important;
        margin:0!important;
        white-space:normal!important;
        line-height:1.05!important;
        font-size:10px!important;
    }
    body.woocommerce-account .cofh-proposal-bulk-delete{
        grid-column:7!important;
        justify-self:stretch!important;
        padding:0!important;
        min-width:0!important;
    }
    body.woocommerce-account .cofh-proposal-delete-all{
        width:100%!important;
        min-width:0!important;
        max-width:100%!important;
        min-height:42px!important;
        padding:0 6px!important;
        margin:0!important;
        white-space:normal!important;
        line-height:1.05!important;
        font-size:10px!important;
    }
}

/* Do not let the generic My Account form-control sizing deform 023 selectors. */
body.woocommerce-account .cofh-proposal-detail-form input[type="checkbox"]{
    width:20px!important;
    height:20px!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
}
body.woocommerce-account .cofh-proposal-detail-form input[type="number"]{
    width:58px!important;
    max-width:100%!important;
    min-height:30px!important;
    height:30px!important;
    margin:0!important;
    padding:3px 5px!important;
}

/* Mobile/tablet continues to use the responsive block layout supplied by 023. */
@media (max-width:900px){
    body.woocommerce-account .woocommerce-MyAccount-content:has(.cofh-proposal-detail-form){
        padding:16px 14px 22px!important;
    }
    body.woocommerce-account .cofh-proposal-detail-form{
        overflow:visible!important;
    }
    body.woocommerce-account .cofh-proposal-detail-table{
        table-layout:auto!important;
    }
    body.woocommerce-account .cofh-proposal-detail-table .cofh-proposal-row-button,
    body.woocommerce-account .cofh-proposal-bulk-add .button,
    body.woocommerce-account .cofh-proposal-delete-all{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        white-space:normal!important;
    }
}

/* Desktop: this seven-column workflow needs more central width than ordinary account pages. */
@media (min-width:1280px){
    body.woocommerce-account.logged-in .cx-account-page-panel > .woocommerce:has(.cofh-proposal-detail-form){
        grid-template-columns:168px minmax(760px,1fr) 168px!important;
        column-gap:18px!important;
    }
    body.woocommerce-account.logged-in .cx-account-page-panel > .woocommerce:has(.cofh-proposal-detail-form) .woocommerce-MyAccount-navigation{
        width:168px!important;
        max-width:168px!important;
    }
    body.woocommerce-account.logged-in .cx-account-page-panel > .woocommerce:has(.cofh-proposal-detail-form) .cx-account-subnav{
        width:168px!important;
        min-width:168px!important;
        max-width:168px!important;
    }
}

/* Restore the 023 action hierarchy instead of inheriting the generic account button skin. */
body.woocommerce-account .cofh-proposal-detail-form .cofh-proposal-confirm-button,
body.woocommerce-account .cofh-proposal-detail-form .cofh-proposal-bulk-add .button{
    background:#11151b!important;
    color:#fff!important;
    border-color:#11151b!important;
    box-shadow:5px 5px 0 #ffd400!important;
}
body.woocommerce-account .cofh-proposal-detail-form .cofh-proposal-delete-button,
body.woocommerce-account .cofh-proposal-detail-form .cofh-proposal-delete-all,
body.woocommerce-account .cofh-proposal-detail-form .cofh-proposal-delete-dialog__yes{
    background:#d71920!important;
    color:#fff!important;
    border-color:#d71920!important;
    box-shadow:5px 5px 0 #ffd400!important;
}
