/* Theme-owned form controls. Kept separate from theme.css so an installed trust
   test can validate the previous theme contract while new releases add controls safely. */
input[type="checkbox"]:not([data-native-checkbox]),input[type="radio"]:not([data-native-radio]){appearance:none;-webkit-appearance:none;width:18px;height:18px;min-width:18px;margin:0 7px 0 0;vertical-align:-3px;border:1.5px solid color-mix(in srgb,var(--muted) 62%,var(--line));background:var(--surface-2);box-shadow:0 1px 2px rgba(0,0,0,.08);display:inline-grid;place-content:center;cursor:pointer;transition:border-color .16s,background .16s,box-shadow .16s,transform .12s}html[dir=rtl] input[type="checkbox"]:not([data-native-checkbox]),html[dir=rtl] input[type="radio"]:not([data-native-radio]){margin:0 0 0 7px}input[type="checkbox"]:not([data-native-checkbox]){border-radius:5px}input[type="radio"]:not([data-native-radio]){border-radius:50%}input[type="checkbox"]:not([data-native-checkbox])::before{content:"";width:9px;height:5px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) scale(0);margin-top:-2px;transition:transform .12s ease}input[type="radio"]:not([data-native-radio])::before{content:"";width:8px;height:8px;border-radius:50%;background:#fff;transform:scale(0);transition:transform .12s ease}input[type="checkbox"]:not([data-native-checkbox]):checked,input[type="radio"]:not([data-native-radio]):checked{background:linear-gradient(135deg,var(--primary),var(--primary-2));border-color:transparent}input[type="checkbox"]:not([data-native-checkbox]):checked::before{transform:rotate(-45deg) scale(1)}input[type="radio"]:not([data-native-radio]):checked::before{transform:scale(1)}input[type="checkbox"]:not([data-native-checkbox]):focus-visible,input[type="radio"]:not([data-native-radio]):focus-visible{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 22%,transparent)}input[type="checkbox"]:disabled,input[type="radio"]:disabled{opacity:.5;cursor:not-allowed}

/* Table/list controls must stay compact even though generic inputs own padding/min-height. */
input[type="checkbox"]:not([data-native-checkbox]),input[type="radio"]:not([data-native-radio]){box-sizing:border-box!important;padding:0!important;min-height:18px!important;max-width:18px!important;max-height:18px!important;line-height:1!important;flex:0 0 18px}
.responsive-table .select-cell input[type="checkbox"]:not([data-native-checkbox]),.responsive-table .select-cell input[type="radio"]:not([data-native-radio]){width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;margin:0!important;padding:0!important}
.responsive-table .select-cell{line-height:1}

/* R7 wrapper convergence: dedicated controls stay compact inside premium rows. */
.choice-control input[type="checkbox"]:not([data-native-checkbox]),.choice-control input[type="radio"]:not([data-native-radio]),.permission-item input[type="checkbox"]:not([data-native-checkbox]),.permission-item input[type="radio"]:not([data-native-radio]){margin:0!important;flex:0 0 18px!important}
.choice-control:has(input:checked),.permission-item:has(input:checked){border-color:color-mix(in srgb,var(--primary) 24%,var(--line));background:color-mix(in srgb,var(--primary) 6%,var(--surface-2))}
.choice-control input:focus-visible,.permission-item input:focus-visible{box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 18%,transparent)!important}
