Zero-order Control Barrier Functions for Sampled-Data Systems with State and Input Dependent Safety Constraints