label.custom_switch.gui-switch.small{
  --thumb-size: 1rem;
}

label.custom_switch.gui-switch {
  --thumb-size: 2rem;
  --thumb: hsl(0, 0%, 100%);
  --thumb-highlight: hsla(0, 0%, 0%, 0.25);
  --track-size: calc(var(--thumb-size) * 2);
  --track-padding: 2px;
  --track-inactive: hsl(80, 0%, 80%);
  --track-active: hsl(80, 60%, 45%);
  --thumb-color: var(--thumb);
  --thumb-color-highlight: var(--thumb-highlight);
  --track-color-inactive: var(--track-inactive);
  --track-color-active: var(--track-active);
  --isLTR: 1;
  display: flex;
  align-items: center;
  gap: 2ch;
  justify-content: space-between;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
label.custom_switch.ios-light {
  flex-direction: column;
  gap: 0.5ch;
  align-items: flex-start;
  --track-active: hsl(212deg 100% 50%);
  --track-inactive: white;
  --thumb-size: 1.5rem;
  --thumb-color: white;
  --thumb-highlight: hsl(212 100% 50% / 25%);
}

label.custom_switch.gui-switch > input {
  --thumb-position: 0%;
  --thumb-transition-duration: 0.25s;
  padding: var(--track-padding);
  background: var(--track-color-inactive);
  inline-size: var(--track-size);
  block-size: var(--thumb-size);
  border-radius: var(--track-size);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  pointer-events: none;
  touch-action: pan-y;
  border: none;
  outline-offset: 5px;
  box-sizing: content-box;
  flex-shrink: 0;
  display: grid;
  align-items: center;
  grid: [track] 1fr / [track] 1fr;
  transition: background-color 0.25s ease;
  outline: none;
}
label.custom_switch.ios-light > input {
  border: 1px solid hsl(0 0% 0% / 15%);
}

label.custom_switch.ios-light > input:focus {
  outline: none;
  box-shadow: none;
}

label.custom_switch.gui-switch > input:checked {
  background: var(--track-color-active);
  --thumb-position: calc((var(--track-size) - 100%) * var(--isLTR));
}

label.custom_switch.gui-switch > input::before {
  --highlight-size: 0;
  content: "";
  cursor: pointer;
  pointer-events: auto;
  grid-area: track;
  inline-size: var(--thumb-size);
  block-size: var(--thumb-size);
  background: var(--thumb-color);
  box-shadow: 0 0 0 var(--highlight-size) var(--thumb-color-highlight);
  border-radius: 50%;
  transform: translateX(var(--thumb-position));
}

label.custom_switch.ios-light > input::before {
  box-shadow: 0 0 0 var(--highlight-size) var(--thumb-color-highlight),
    0 0 0 1px hsl(0 0% 0% / 15%), 0px 3px 4px 1px hsl(0 0% 0% / 20%);
}
label.custom_switch.gui-switch > input:not(:disabled):hover::before {
  --highlight-size: 0.5rem;
}
label.custom_switch.gui-switch > input::before {
  transition: transform var(--thumb-transition-duration) ease,
    box-shadow 0.25s ease;
}
@media (prefers-reduced-motion: no-preference) {
  label.custom_switch.gui-switch > input::before {
    transition: transform var(--thumb-transition-duration) ease,
      box-shadow 0.25s ease;
  }
}

label.custom_switch.gui-switch {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}
label.custom_switch.gui-switch > input {
  margin: 0;
  margin-left: 2rem;
}

label.custom_switch.gui-switch > input:disabled {
  opacity: 0.5;
}
