/* ROUND 92 - one size, one look and one alignment for every checkbox and radio in the project.
   Checkboxes: 1.2em square, border follows the text colour (works in Light and Dark), filled with the page accent when checked, own tick (no tick image to go invisible).
   Radios keep the project's on/off-switch design (an earlier explicit request); here they only get the same alignment rules.
   Left alone on purpose: .btn-check, .ba-onoff and .form-switch controls, role=switch, hidden helpers. */
:root{--ba-cb:1.2em;--ba-cb-on:var(--dev-accent,var(--primary,var(--sb-accent,#4f46e5)));--ba-cb-ink:#ffffff}
input[type="checkbox"]:not(.btn-check):not([role="switch"]):not(.visually-hidden):not(.d-none):not([hidden]):not(.ba-onoff *):not(.form-switch *){-webkit-appearance:none!important;appearance:none!important;box-sizing:border-box;width:var(--ba-cb)!important;height:var(--ba-cb)!important;min-width:var(--ba-cb);min-height:0!important;flex:0 0 var(--ba-cb);margin:0;padding:0!important;color:inherit;
 border:2px solid color-mix(in srgb,currentColor 50%,transparent)!important;border-radius:.3em!important;background:transparent!important;background-image:none!important;
 display:inline-grid;place-content:center;vertical-align:-.28em;cursor:pointer;position:relative;float:none;transition:background-color .15s,border-color .15s,box-shadow .15s}
input[type="checkbox"]:not(.btn-check):not([role="switch"]):not(.visually-hidden):not(.d-none):not([hidden]):not(.ba-onoff *):not(.form-switch *)::before{content:"";width:.66em;height:.66em;background:var(--ba-cb-ink);clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0%,43% 62%);transform:scale(0);transition:transform .12s ease}
input[type="checkbox"]:not(.btn-check):not([role="switch"]):not(.visually-hidden):not(.d-none):not([hidden]):not(.ba-onoff *):not(.form-switch *):checked{background:var(--ba-cb-on)!important;border-color:var(--ba-cb-on)!important}
input[type="checkbox"]:not(.btn-check):not([role="switch"]):not(.visually-hidden):not(.d-none):not([hidden]):not(.ba-onoff *):not(.form-switch *):checked::before{transform:scale(1)}
input[type="checkbox"]:not(.btn-check):not([role="switch"]):not(.visually-hidden):not(.d-none):not([hidden]):not(.ba-onoff *):not(.form-switch *):indeterminate{background:var(--ba-cb-on)!important;border-color:var(--ba-cb-on)!important}
input[type="checkbox"]:not(.btn-check):not([role="switch"]):not(.visually-hidden):not(.d-none):not([hidden]):not(.ba-onoff *):not(.form-switch *):indeterminate::before{clip-path:polygon(0 38%,100% 38%,100% 62%,0 62%);transform:scale(1)}
input[type="checkbox"]:not(.btn-check):not([role="switch"]):not(.visually-hidden):not(.d-none):not([hidden]):not(.ba-onoff *):not(.form-switch *):hover:not(:disabled){border-color:var(--ba-cb-on)!important}
input[type="checkbox"]:not(.btn-check):not([role="switch"]):not(.visually-hidden):not(.d-none):not([hidden]):not(.ba-onoff *):not(.form-switch *):focus-visible{outline:2px solid color-mix(in srgb,var(--ba-cb-on) 55%,transparent);outline-offset:2px;box-shadow:none}
input[type="checkbox"]:not(.btn-check):not([role="switch"]):not(.visually-hidden):not(.d-none):not([hidden]):not(.ba-onoff *):not(.form-switch *):disabled{opacity:.5;cursor:not-allowed}
/* ---- labels that wrap a checkbox or radio: control and statement on one line, centred, with a clean gap ---- */
label:has(> input[type="checkbox"]:not(.btn-check)):not(.ba-onoff):not(.btn),label:has(> input[type="radio"]:not(.btn-check)):not(.ba-onoff):not(.btn){display:inline-flex;align-items:center;gap:.5em;vertical-align:middle;cursor:pointer;line-height:1.35}
label.d-block:has(> input[type="checkbox"]:not(.btn-check)),label.d-block:has(> input[type="radio"]:not(.btn-check)),label.d-flex:has(> input[type="checkbox"]),label.d-flex:has(> input[type="radio"]){display:flex!important}
/* ---- Bootstrap .form-check (and switches): same flex alignment, no float/negative-margin tricks ---- */
.form-check{display:flex;align-items:center;gap:.5em;padding-left:0!important;min-height:0}
.form-check-inline{display:inline-flex;margin-right:1rem}
.form-check>.form-check-input{float:none!important;margin:0!important}
.form-check>.form-check-label{margin:0;line-height:1.35}
.form-switch.form-check{gap:.6em}
.form-switch .form-check-input{flex:0 0 2em}
/* ---- unlabelled controls in tables / toolbars sit on the text line ---- */
td>input[type="checkbox"],th>input[type="checkbox"],td>input[type="radio"],th>input[type="radio"]{vertical-align:middle}
/* ---- ON/OFF pill switches (.ba-onoff): when they are NOT inside a flex row (e.g. a plain block followed by an inline label) the pill sat on the text baseline,
        so its statement looked low. Centre both on the same line and give a small gap. Pills inside flex rows (d-flex / .switch-row) are already centred and unaffected. ---- */
.ba-onoff{vertical-align:middle}
.ba-onoff + label,.ba-onoff + span:not([class]){vertical-align:middle}
:where(div,td,p,li):not(.d-flex):not(.switch-row):not([style*="flex"]) > .ba-onoff + label{margin-left:.55rem!important}
