@import '@/sass/style.scss';

.ToggleButton,
.ToggleButton--selected {
  display: block;
  height: 36px;
  position: relative;
  width: 100%;

  .rail {
    background-color: $very-dark-yellowish-green;
    border-radius: 18px;
    border: solid 3px $black;
    height: 16px;
    left: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 200ms;
    width: 100%;
  }

  .circle {
    background-color: $very-soft-green;
    border-radius: 50%;
    border: solid 3px $black;
    height: 32px;
    left: 0;
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    transition: left 200ms, transform 200ms;
    width: 32px;
  }
}

.ToggleButton--selected {
  .rail {
    background-color: $vivid-green;
  }

  .circle {
    left: 100%;
    transform: translate(-100%, -50%);
  }
}
