label.switch {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  font-weight: 400;

  .switch-track {
    display: inline-block;
    width: 2rem;
    height: 16px;
    background-color: oklch(55.4% 0.046 257.417);
    border-radius: 9999px;
    position: relative;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-duration: 200ms;
    transition-timing-function: ease-in-out;
    margin-right: 0.5rem;
  }

  &[disabled] {
    .switch-track {
      background-color: oklch(0.8693 0.0065 264.531);
      cursor: not-allowed;
    }

    color: oklch(70.4% 0.04 256.788);
    cursor: not-allowed;
  }

  .switch-thumb {
    position: absolute;
    left: 0.22rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.625rem;
    height: 0.625rem;
    background-color: white;
    border-radius: 9999px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    transition-property: left;
    transition-duration: 200ms;
    transition-timing-function: ease-in-out;
  }

  &:has(input:checked) .switch-track {
    background-color: oklch(0.5881 0.1593 241.966);

    .switch-thumb {
      left: calc(2rem - 0.625rem - 0.25rem);
    }
  }

  input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }
}
