/* -------------
    SOMMAIRE
------------- */

/*
    @AUTHOR : Nicolas BOUDOT

    ATOME : CHECKBOX
    Styles des input [type="checkbox"] et de leur label
*/

/*
    01 - CHECKBOX
    02 - LABEL
*/



/* ---------------------
    01 - CHECKBOX
--------------------- */

/* @changelog 2024-07-01 [FIX] (Nicolas) On masque ici les input checkboxs car ils seront fait en pseudo-éléments */
div.wpforms-container-full .wpforms-form .wpforms-field input[type="checkbox"],
input[type="checkbox"],
.woocommerce-input-wrapper label.checkbox input[type="checkbox"],
.atom_checkbox {
    display: none;
}

/* ---------------------
    02 - LABEL
--------------------- */

div ul.acf-checkbox-list li label,
div.wpforms-container-full .wpforms-form .wpforms-field .wpforms-field-label-inline,
input[type="checkbox"] + label {
    display: inline-block;
    color: var(--gray-800);
    font-size: 1.4rem;
}

    /* Checked */
    div ul.acf-checkbox-list li label.selected,
    div.wpforms-container-full .wpforms-form .wpforms-field input[type="checkbox"]:checked + .wpforms-field-label-inline,
    input[type="checkbox"]:checked + label {
        color: var(--c-primary);
    }

    /* Before */
    .woocommerce-form-login__rememberme span::before,
    div ul.acf-checkbox-list li label::before,
    input[type="checkbox"] + label::before,
    .woocommerce-input-wrapper label.checkbox::before,
    .woocommerce-form__label.checkbox input[type="checkbox"] + span::before {
        content: "";
        display: inline-block;
        justify-content: center;
        align-items: center;
        color: transparent;
        border: 2px solid var(--gray-600);
        border-radius: 4px;
        font-family: 'icomoon';
        font-size: 8px;
        width: 18px;
        min-width: 18px;
        height: 18px;
        min-height: 18px;
        margin-right: 10px;
        vertical-align: middle;
        margin-top: -5px;
    }

        /* Checked */
        .woocommerce-input-wrapper label.checkbox:has(input[type="checkbox"]:checked)::before,
        .woocommerce-form-login__rememberme input[type="checkbox"]:checked + span::before,
        div ul.acf-checkbox-list li label.selected::before,
        input[type="checkbox"]:checked + label::before,
        .woocommerce-form__label.checkbox input[type="checkbox"]:checked + span::before {
            content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z' fill='%237bb914'/%3E%3C/svg%3E");
            color: var(--c-primary);
            border-color: var(--c-primary);
        }
