
/* Native input volledig verbergen */
input[type=radio].css-radio,
input[type=checkbox].css-checkbox {
    opacity: 0 !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
}

/* Label = klikbaar element met tekst + visueel vakje (via ::before) */
input[type=radio].css-radio + label.css-label2,
input[type=checkbox].css-checkbox + label.css-label {
    position: relative !important;
    display: inline-block !important;
    padding: 0 0 0 32px !important;
    min-height: 22px !important;
    height: auto !important;
    line-height: 22px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: .95rem !important;
    font-weight: 500 !important;
    color: #2C242A !important;          /* --ink */
    cursor: pointer !important;
    background: none !important;        /* kill legacy PNG-sprite */
    background-image: none !important;
}

/* Visueel vakje: 20x20 met border, gecentreerd verticaal op label */
input[type=radio].css-radio + label.css-label2::before,
input[type=checkbox].css-checkbox + label.css-label::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #E4DCCD !important;    /* --rule */
    background: #FFFFFF !important;          /* --paper */
    box-sizing: border-box !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 13px 13px !important;
    transition: background-color .15s, border-color .15s !important;
}

/* Vorm */
input[type=radio].css-radio + label.css-label2::before {
    border-radius: 50% !important;
}
input[type=checkbox].css-checkbox + label.css-label::before {
    border-radius: 5px !important;
}

/* Checked state: primary-dark achtergrond + ingebouwde SVG (perfect gecentreerd) */
input[type=radio].css-radio:checked + label.css-label2::before {
    background-color: #30252C !important;    /* --primary */
    border-color: #30252C !important;
    /* witte cirkel via SVG; perfect gecentreerd door background-position:center */
    background-image: none !important;
}
input[type=checkbox].css-checkbox:checked + label.css-label::before {
    background-color: #30252C !important;
    border-color: #30252C !important;
    /* witte vink via SVG; perfect gecentreerd */
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6 L5 8.5 L9.5 3.5' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") !important;
}

/* Focus-state voor keyboard-gebruikers */
input[type=radio].css-radio:focus-visible + label.css-label2::before,
input[type=checkbox].css-checkbox:focus-visible + label.css-label::before {
    box-shadow: 0 0 0 3px rgba(48, 37, 44, .18) !important;
}

html body input[type=radio].css-radio + label.css-label2::after,
html body input[type=checkbox].css-checkbox + label.css-label::after {
    content: none !important;
    display: none !important;
    background: none !important;
}
html body input[type=radio].css-radio + label.css-label2::before,
html body input[type=checkbox].css-checkbox + label.css-label::before {
    width: 20px !important;
    height: 20px !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    border: 2px solid #E4DCCD !important;
    background-color: #FFFFFF !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 13px 13px !important;
}
html body input[type=radio].css-radio:checked + label.css-label2::before {
    background-color: #30252C !important;
    border-color: #30252C !important;
    background-image: none !important;
}
html body input[type=checkbox].css-checkbox:checked + label.css-label::before {
    background-color: #30252C !important;
    border-color: #30252C !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6 L5 8.5 L9.5 3.5' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") !important;
}
html body input[type=checkbox].css-checkbox + label.css-label { padding-left: 30px !important; }

html body input[type=radio].css-radio:checked + label.css-label2::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    left: 10px !important;          /* box: left:0, width:20px → midden = 10px */
    top: 50% !important;
    width: 9px !important;
    height: 9px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #FFFFFF !important;
    transform: translate(-50%, -50%) !important;
    box-shadow: none !important;
}

.fancy-checkbox input[type="checkbox"] + span:before { border-radius: 4px !important; border-color: var(--rule, #E4DCCD) !important; }
.fancy-checkbox input[type="checkbox"]:checked + span:before { background-color: var(--primary, #30252C) !important; border-color: var(--primary, #30252C) !important; color: #fff !important; }
