/* Explicit track and thumb colors keep both states visible across themes. */
html {
  --switch-off:#38565e;
  --switch-on:#00766b;
  --switch-edge:#9bc0c6;
  --switch-focus:#7dece0;
}
html[data-theme="light"], body:not(.dark):has(.settings-switch-row) {
  --switch-off:#526d75;
  --switch-on:#00695e;
  --switch-edge:#34545d;
  --switch-focus:#00695e;
}
html body :is(.settings-switch-row,.switch-row,.record-switch-field) input[type="checkbox"]:has(+i) {
  display:block !important;
  position:absolute;
  opacity:0;
  inline-size:1px;
  block-size:1px;
}
html body :is(.settings-switch-row,.switch-row,.record-switch-field) input[type="checkbox"] + i,
html body button.switch {
  box-sizing:border-box;
  width:48px !important;
  height:28px !important;
  flex:0 0 48px;
  border:1px solid var(--switch-edge) !important;
  border-radius:999px;
  background:var(--switch-off) !important;
  padding:0;
}
html body :is(.settings-switch-row,.switch-row,.record-switch-field) input:checked + i,
html body button.switch:is(.on,[aria-checked="true"]) {
  background:var(--switch-on) !important;
}
html body :is(.settings-switch-row,.switch-row,.record-switch-field) input[type="checkbox"] + i::after,
html body button.switch > i {
  position:absolute;
  width:20px;
  height:20px;
  top:3px;
  left:3px;
  border-radius:50%;
  background:#fff !important;
  transform:none;
  box-shadow:0 1px 3px #0005;
}
html body button.switch {position:relative}
html body :is(.settings-switch-row,.switch-row,.record-switch-field) input:checked + i::after,
html body button.switch:is(.on,[aria-checked="true"]) > i {
  transform:translateX(20px);
}
html body :is(.settings-switch-row,.switch-row,.record-switch-field) input:focus-visible + i,
html body button.switch:focus-visible {
  outline:2px solid var(--switch-focus);
  outline-offset:3px;
}
html body :is(.settings-switch-row,.switch-row,.record-switch-field) input:disabled + i {
  opacity:.75;
  cursor:not-allowed;
}
