/* Cart actions retain the native WHMCS submit path. */
body.whmcsbody #order-standard_cart .item-qty button[type="submit"],
body.whmcsbody #order-standard_cart .ipwh-quantity-update {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    min-height: 44px;
    margin-top: 8px;
    padding: 9px 14px;
    border: 2px solid #81221f;
    border-radius: 7px;
    background: #fff;
    color: #81221f;
    font: 700 14px/1.3 Arial, sans-serif;
    cursor: pointer;
    text-decoration: none;
}
body.whmcsbody #order-standard_cart .ipwh-quantity-update.ipwh-quantity-dirty {
    background: #81221f;
    color: #fff;
}
body.whmcsbody #order-standard_cart .item-qty button[type="submit"]:hover,
body.whmcsbody #order-standard_cart .ipwh-quantity-update:hover {
    border-color: #5e1816;
    background: #5e1816;
    color: #fff;
}
body.whmcsbody #order-standard_cart .item-qty button[type="submit"]:focus-visible,
body.whmcsbody #order-standard_cart .ipwh-quantity-update:focus-visible {
    outline: 3px solid #ad4a43;
    outline-offset: 3px;
}
body.whmcsbody #order-standard_cart .item-qty input[type="number"] { min-height: 44px; }
html[data-ipwh-theme="dark"] body.whmcsbody #order-standard_cart .ipwh-quantity-update {
    border-color: #efa09a;
    background: #172234;
    color: #ffb1aa;
}
html[data-ipwh-theme="dark"] body.whmcsbody #order-standard_cart .ipwh-quantity-update.ipwh-quantity-dirty,
html[data-ipwh-theme="dark"] body.whmcsbody #order-standard_cart .ipwh-quantity-update:hover {
    border-color: #efa09a;
    background: #81221f;
    color: #fff;
}
body.whmcsbody #order-standard_cart .ipwh-quantity-hint {
    display: block !important;
    margin: 6px 0 0;
    color: #596579;
    font: 13px/1.4 Arial, sans-serif;
}
body.whmcsbody #order-standard_cart .ipwh-quantity-hint[hidden] { display: none !important; }
html[data-ipwh-theme="dark"] body.whmcsbody #order-standard_cart .ipwh-quantity-hint { color: #c5d0df; }

/* Only the OX management surface participates in this layout. */
body.ipwh-ox-management .ipwh-ox-modal {
    position: fixed;
    top: var(--ipwh-ox-modal-top, 150px) !important;
    bottom: 0 !important;
    left: 0;
    right: 0;
    height: auto !important;
    z-index: var(--ipwh-ox-modal-z, 2100) !important;
    overflow-x: hidden;
    overflow-y: auto;
}
body.ipwh-ox-management .ipwh-ox-modal .modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - 24px);
    max-width: calc(100% - 24px);
    margin: 12px auto;
    transform: none !important;
}
body.ipwh-ox-management .ipwh-ox-modal .modal-dialog:not(.modal-lg):not(.modal-xl) { width: 500px; }
body.ipwh-ox-management .ipwh-ox-modal .modal-dialog.modal-lg { width: 800px; }
body.ipwh-ox-management .ipwh-ox-modal .modal-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: calc(100vh - var(--ipwh-ox-modal-top, 150px) - 24px);
    max-height: calc(100dvh - var(--ipwh-ox-modal-top, 150px) - 24px);
    margin: 0;
}
body.ipwh-ox-management .ipwh-ox-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}
body.ipwh-ox-management .ipwh-ox-modal .modal-header,
body.ipwh-ox-management .ipwh-ox-modal .modal-footer { flex: 0 0 auto; }
body.ipwh-ox-management .modal-backdrop { z-index: var(--ipwh-ox-backdrop-z, 2090) !important; }
