/* Physical positions are intentional: checked on the right, unchecked on the left. */
input[type="checkbox"] {
    -webkit-appearance:none !important;
    appearance:none !important;
    position:relative !important;
    display:inline-block;
    width:37px !important;
    height:20px !important;
    min-width:37px;
    padding:0 !important;
    border-radius:999px !important;
    background-color:#d1d5db !important;
    background-image:radial-gradient(circle, #fff 0 8px, transparent 9px) !important;
    background-size:20px 20px !important;
    background-repeat:no-repeat !important;
    background-position:left 2px center !important;
    cursor:pointer;
    vertical-align:middle;
    box-sizing:border-box;
    clip:auto !important;
    clip-path:none !important;
    overflow:visible !important;
    flex-shrink:0;
    transition:background-color .18s,background-position .18s !important;
}
input[type="checkbox"]:checked {
    background-color:#22c55e !important;
    border-color:#16a34a !important;
    background-position:right 1px center !important;
}
input[type="checkbox"]:indeterminate {
    background-color:#94a3b8 !important;
    background-position:center !important;
}
input[type="checkbox"]:focus-visible { outline:3px solid #93c5fd !important; outline-offset:3px; }
input[type="checkbox"]:disabled { opacity:.5; cursor:not-allowed; }
/* Replace the storefront's existing decorative track with the native switch. */
input[type="checkbox"].peer + div[class*="after:"] { display:none !important; }
input[type="checkbox"]::before, input[type="checkbox"]::after { content:none !important; }
.availability-control { display:inline-flex; flex-direction: column; align-items:center; gap:8px; white-space:nowrap; }
.availability-label { font-size:12px; }
.availability-on { display:none; color:#15803d; }
.availability-off { color:var(--body-quiet-color,#64748b); }
.availability-control input:checked + .availability-label .availability-on { display:inline; }
.availability-control input:checked + .availability-label .availability-off { display:none; }
@media(prefers-reduced-motion:reduce) { input[type="checkbox"] { transition:none !important; } }

/* Action selection uses round checkboxes, including the select-all control. */
#changelist #result_list .action-checkbox input[type="checkbox"],
#changelist #result_list input[type="checkbox"].action-select,
#changelist #result_list input[type="checkbox"]#action-toggle {
    width:22px !important;
    min-width:22px !important;
    max-width:22px !important;
    height:22px !important;
    min-height:22px !important;
    padding:0 !important;
    border:2px solid #d9d9d9 !important;
    border-radius:50% !important;
    background-color:#fff !important;
    background-image:none !important;
    background-position:center !important;
    background-size:100% 100% !important;
    box-shadow:none !important;
}
#changelist #result_list .action-checkbox input[type="checkbox"]:checked,
#changelist #result_list input[type="checkbox"].action-select:checked,
#changelist #result_list input[type="checkbox"]#action-toggle:checked {
    border-color:#2196ff !important;
    background-image:radial-gradient(circle, #2196ff 0 5px, transparent 5.5px) !important;
}
#changelist #result_list input[type="checkbox"]#action-toggle:indeterminate {
    border-color:#2196ff !important;
    background-image:linear-gradient(#2196ff,#2196ff) !important;
    background-size:10px 3px !important;
}

/* Keep the repeated grip background confined to a 20px handle. */
#changelist #result_list td.field-_reorder_ {
    width:20px;
    padding-right:8px;
    padding-left:8px;
    text-align:center;
}
#changelist #result_list div.drag {
    display:inline-block;
    width:20px !important;
    min-width:20px !important;
    max-width:20px !important;
    box-sizing:border-box;
    padding:0 !important;
    margin:0;
    vertical-align:middle;
}
