/* ON/OFF Switch
  Modif of Clean On/Off Toggle at https://1stwebdesigner.com/css-snippets-radio-toggles-switches/


  LN @ INAF-OAS, Oct. 2018.  Last change: 08/07/2024
*/

.onoff .onoffswitch-label {
  display: block;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid hsl(0, 0%, 90%);
  -moz-border-radius: 20px;
  -webkit-border-radius: 20px;
  border-radius: 20px;
  margin: 0;
}

.onoff .onoffswitch-inner {
  width: 200%;
  margin-left: -100%;
  -webkit-transition: margin 0.15s ease-in-out;
  -o-transition: margin 0.15s ease-in-out;
  -moz-transition: margin 0.15s ease-in-out;
  transition: margin 0.15s ease-in-out;
}

.onoff .onoffswitch-inner:before,
.onoff .onoffswitch-inner:after{
  float: left;
  width: 50%;
  height: 24px;
  padding: 0;
  line-height: 24px;
  font-size: 80%;
  color: hsl(0, 0%, 100%);
  font-weight: normal;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.onoff .onoffswitch-inner:before {
  background-color: hsl(203, 100%, 39.1569%);
  color: hsl(0, 0%, 100%);
}

.onoff .onoffswitch-inner:after {
  background-color: hsl(0, 0%, 98%);
  color: hsl(0, 0%, 24%);
  text-align: right;
}

.onoff .onoffswitch-switch {
  width: 22px;
  height: 22px;
  margin: 0;
  background: hsl(0, 0%, 100%);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
  -moz-border-radius: 50%;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  bottom: 0;


  -webkit-transition: right 0.15s ease-in-out;
  -o-transition: right 0.15s ease-in-out;
  -moz-transition: right 0.15s ease-in-out;
  transition: right 0.15s ease-in-out;
}


.toggle-group {
  position: relative;
  height: inherit;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  top: 50%;
}

.toggle-group input[type=checkbox] {
  position: absolute;
  left: 10px;
}

.toggle-group input[type=checkbox]:checked ~ .onoff .onoffswitch-label .onoffswitch-inner {
  margin-left: 0;
}

.toggle-group input[type=checkbox]:checked ~ .onoff .onoffswitch-label .onoffswitch-switch {
  right: 2px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
}

.toggle-group label {
  position: absolute;
  cursor: pointer;
  padding-left: 100px;
  display: inline-block;
  text-align: left;
  line-height: 24px;
  z-index: 1;
  height: 24px;
}


/* Single or multiple catalogues drawing */
.onoffswitch-sc {
  position: relative;
  width: 124px;
  font-size: 1rem;
}

.onoffswitch-sc .onoffswitch-inner:before {
  content: "Last Cat. view";  /* ON */
  padding-left: 10px;
}

.onoffswitch-sc .onoffswitch-inner:after {
  content: "Multi Cat. view";  /* OFF */
  padding-right: 10px;
}

.onoffswitch-sc .onoffswitch-switch {
  right: 100px;
}


/* Base catalogue only or HiPS */
.onoffswitch-bc {
  position: relative;
  width: 100px;
  font-size: 1rem;
}
.onoffswitch-bc .onoffswitch-inner:before {
  content: "Base Cat.";  /* ON */
  padding-left: 10px;
}

.onoffswitch-bc .onoffswitch-inner:after {
  content: "HiPS Cats";  /* OFF */
  padding-right: 10px;
}

.onoffswitch-bc .onoffswitch-switch {
  right: 76px;
}


/* Show/Hide the extended objects region */
.onoffswitch-ex {
  position: relative;
  width: 110px;
  font-size: 1rem;
}
.onoffswitch-ex .onoffswitch-inner:before {
  content: "Reg. hidden";  /* ON */
  padding-left: 10px;
}

.onoffswitch-ex .onoffswitch-inner:after {
  content: "Reg. shown";  /* OFF */
  padding-right: 10px;
}

.onoffswitch-ex .onoffswitch-switch {
  right: 86px;
}


/* Show/Hide the objects label */
.onoffswitch-lb {
  position: relative;
  width: 110px;
  font-size: 1rem;
}
.onoffswitch-lb .onoffswitch-inner:before {
  content: "Lab. shown";  /* ON */
  padding-left: 10px;
}

.onoffswitch-lb .onoffswitch-inner:after {
  content: "Lab. hidden";  /* OFF */
  padding-right: 10px;
}

.onoffswitch-lb .onoffswitch-switch {
  right: 86px;
}


/* Field names from catalogue or from CatParams */
.onoffswitch-fn {
  position: relative;
  width: 118px;
  font-size: 1rem;
}
.onoffswitch-fn .onoffswitch-inner:before {
  content: "Conv. names";  /* ON */
  padding-left: 10px;
}

.onoffswitch-fn .onoffswitch-inner:after {
  content: "TabFld names";  /* OFF */
  padding-right: 10px;
}

.onoffswitch-fn .onoffswitch-switch {
  right: 94px;
}


/* Refresh all queried or only the current one */
.onoffswitch-ref {
  position: relative;
  width: 110px;
  font-size: 1rem;
}
.onoffswitch-ref .onoffswitch-inner:before {
  content: "Refresh all";  /* ON */
  padding-left: 14px;
}

.onoffswitch-ref .onoffswitch-inner:after {
  content: "Refresh last";  /* OFF */
  padding-right: 10px;
}

.onoffswitch-ref .onoffswitch-switch {
  right: 86px;
}


/* Replot objects on sky zoom or position change */
.onoffswitch-zp {
  position: relative;
  width: 128px;
  font-size: 1rem;
}
.onoffswitch-zp .onoffswitch-inner:before {
  content: "Auto Refresh";  /* ON */
  padding-left: 10px;
}

.onoffswitch-zp .onoffswitch-inner:after {
  content: "Manual Refresh";  /* OFF */
  padding-right: 8px;
}

.onoffswitch-zp .onoffswitch-switch {
  right: 104px;
}


/* Mark brightest object in HiPS catalogue instead of the HEALPix barycenter */
.onoffswitch-bshp {
  position: relative;
  width: 128px;
  font-size: 1rem;
}
.onoffswitch-bshp .onoffswitch-inner:before {
  content: "HPX brightest";  /* ON */
  padding-left: 10px;
}

.onoffswitch-bshp .onoffswitch-inner:after {
  content: "HPX barycenter";  /* OFF */
  padding-right: 8px;
}

.onoffswitch-bshp .onoffswitch-switch {
  right: 104px;
}


/* Draw HEALPix border */
.onoffswitch-hpxbrd {
  position: relative;
  width: 128px;
  font-size: 1rem;
}
.onoffswitch-hpxbrd .onoffswitch-inner:before {
  content: "HPX borders on";  /* ON */
  padding-left: 10px;
}

.onoffswitch-hpxbrd .onoffswitch-inner:after {
  content: "HPX borders off";  /* OFF */
  padding-right: 8px;
}

.onoffswitch-hpxbrd .onoffswitch-switch {
  right: 104px;
}
