.radio-wrapper {
  display: inline-block;
  border: 2px solid transparent;
  transition: 0.2s ease;
  margin-bottom: 2px;
  margin: auto;
  border-radius: 32px;
  background: white;
  margin-bottom: 4px;
  width: 60px;
  height: 32px;
}

.radio-wrapper:has(input:hover) {
  outline: none;
  border: 2px solid var(--accent-fade);
  background-color: #fff;
}

.radio-wrapper label {
  margin: 0;
}

.radio-wrapper input {
  opacity: 0;
  position: absolute;
}

.radio-wrapper input+label {
  position: relative;
  display: inline-block;
  user-select: none;
  -moz-transition: 0.2s ease;
  -o-transition: 0.2s ease;
  -webkit-transition: 0.2s ease;
  transition: 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  height: calc(100%);
  width: calc(100%);
  background-color: whitesmoke;
  border: 1px solid #e4e4e4;
  border-radius: 30px;
}

.radio-wrapper input:hover+label {
  border: 1px solid transparent;
}

.radio-wrapper input+label:before {
  content: "";
  position: absolute;
  display: block;
  -moz-transition: 0.1s cubic-bezier(0.24, 0, 0.5, 1);
  -o-transition: 0.1s cubic-bezier(0.24, 0, 0.5, 1);
  -webkit-transition: 0.1s cubic-bezier(0.24, 0, 0.5, 1);
  transition: 0.1s cubic-bezier(0.24, 0, 0.5, 1);
  height: calc(100% + 2px);
  width: calc(100% + 2px);
  top: 0;
  left: 0;
  border-radius: 30px;
}

.radio-wrapper input+label:after {
  content: "";
  position: absolute;
  display: block;
  box-shadow: 0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 0px 0 hsla(0, 0%, 0%, 0.04), 0 4px 9px hsla(0, 0%, 0%, 0.13), 0 3px 3px hsla(0, 0%, 0%, 0.05);
  -moz-transition: 0.1s cubic-bezier(0.54, 1.6, 0.5, 1);
  -o-transition: 0.1s cubic-bezier(0.54, 1.6, 0.5, 1);
  -webkit-transition: 0.1s cubic-bezier(0.54, 1.6, 0.5, 1);
  transition: 0.1s cubic-bezier(0.54, 1.6, 0.5, 1);
  background: whitesmoke;
  aspect-ratio: 1 / 1;
  height: calc(100%);
  top: 0px;
  left: 0px;
  border-radius: 30px;
}

.radio-wrapper input:checked+label:before {
  background: var(--accent);
  -moz-transition: width 2.1s cubic-bezier(0, 0, 0, 0.1);
  -o-transition: width 2.1s cubic-bezier(0, 0, 0, 0.1);
  -webkit-transition: width 2.1s cubic-bezier(0, 0, 0, 0.1);
  transition: width 2.1s cubic-bezier(0, 0, 0, 0.1);
  top: -1px;
  left: -1px;
}

.radio-wrapper input:checked+label:after {
  left: calc(100% - 26px);
}