/* Hide the default checkbox */
.gfield--input-type-custom_checkbox_field input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;  /* For Safari */
    -moz-appearance: none;     /* For older Firefox */
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    background-color: white;
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    transition: all 0.2s ease-in-out;
    border-radius: 4px;  /* Rounded corners for checkboxes */
}

/* Styling the checkbox when it's clicked (checked) */
.gfield--input-type-custom_checkbox_field input[type="checkbox"].clicked {
    border-color: #4CAF50;  /* Green border to indicate checked */
    background-color: #4CAF50; /* Green background for checked state */
}

/* Adding a checkmark using the ::before pseudo-element */
.gfield--input-type-custom_checkbox_field input[type="checkbox"]::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    background-color: transparent;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease-in-out;
}

/* Show the checkmark when the checkbox is clicked */
.gfield--input-type-custom_checkbox_field input[type="checkbox"].clicked::before {
    background-color: white;  /* White checkmark */
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* Optional: Style label when the checkbox is checked */
.gfield--input-type-custom_checkbox_field input[type="checkbox"].clicked label {
    color: #4CAF50; /* Green label for checked state */
}

/* Animation for the checkbox */
.gfield--input-type-custom_checkbox_field input[type="checkbox"] {
    transition: background-color 0.3s, border-color 0.3s;
}
