/*********************
 * Choice (Checkbox & Radio buttons)
**********************/
/* hide default input */
.bb-form-field.-checkbox-radio {position:absolute; opacity:0; width:0; pointer-events:none;}

/* label */
.bb-form-field.-checkbox-radio + label {
    padding-left:calc(var(--form-choice-size) + 8px); position:relative; cursor:pointer;
    display:inline-block;
}

/* box */
.bb-form-field.-checkbox-radio + label:before {
    position:absolute; top:.15em; left:0;
    content:""; display:inline-block;
    width:var(--form-choice-size); aspect-ratio:1;
    transition:all .3s ease;
    background:var(--form-bg);
    border-radius:var(--form-radius);
}

/* :hover:focus */
.bb-form-field.-checkbox-radio:focus + label:before,
.bb-form-field.-checkbox-radio:hover + label:before {
    background:var(--form-bg-hover);
    border-color:var(--form-border-color-hover);
}

/* :checked */
.bb-form-field.-checkbox-radio:checked + label:before {
    background:var(--form-choice-bg-active);
}

/* :checked:hover:focus */
.bb-form-field.-checkbox-radio:checked:hover + label:before,
.bb-form-field.-checkbox-radio:checked:focus + label:before {
    background:var(--form-choice-bg-active); border-color:var(--form-choice-bg-active);
}


/* checked icon */
.bb-form-field.-checkbox-radio + label:after {
    position:absolute; top:1px; left:-1px; display:inline-block;
    content:"N";
    font-family:ETmodules;
    font-size:12px;
    font-weight:600;
    transition:all .1s ease; transform:translateX(.4em);
}

/* :checked */
.bb-form-field.-checkbox-radio:not(:checked) + label:after {
    opacity:0;
}


/* error:not(:checked) */
.bb-form-field.-checkbox-radio.-error:not(:checked) + label:before {
    box-shadow:0 0 0 1px var(--form-color-error);
}

/* a11y */
.bb-form-field.-checkbox-radio:focus-visible + label:before {}


/*********************************************
 * Checkbox
**********************************************/
.bb-form-field[type="checkbox"] + label {}


/*********************************************
 * Radio
**********************************************/
.bb-form-field[type="radio"] + label {
    --form-radius:50%;
}
.bb-form-field[type="radio"] + label:after {
    content:""; width:7px; aspect-ratio:1;
    background:#000; border-radius:50%;
    top:.55em; left:.1em;
}