@import '../../less/Global.less';

.r-Toggle {
  position: relative;
}

.r-Toggle__input.checked + .r-Toggle__button {
  background: @primary-background;
}

.r-Toggle__input + .r-Toggle__button {
  background: @default-background;
  border-radius: 2em;
  padding: 2px;
  -webkit-transition: all 0.4s ease;
  transition: all 0.4s ease;
  border: 1px solid @default-border;
}

.r-Toggle__input + .r-Toggle__button {
  outline: 0;
  display: inline-block !important;
  height: 2em;
  position: relative;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  width: 100%;
}

.r-Toggle.e-text .r-Toggle__input + .r-Toggle__button {
  display: table !important;
}

.r-Toggle__input + .r-Toggle__button > div {
  font-size: 14px;

  color: #888;
}

.r-Toggle__input + .r-Toggle__button .text-right {
  margin-left: 35px;
  margin-right: 10px;
}

.r-Toggle__input + .r-Toggle__button .text-white {
  margin-right: 35px;
  margin-left: 10px;
}

.r-Toggle__input + .r-Toggle__button:after {
  position: absolute;
  top: 0;
  display: block;
  content: '';
  width: 30px;
  height: 100%;
  left: 0;
  -webkit-transform: translateX(0%);
  -webkit-transition: all 0.4s ease;
}

.r-Toggle__input.checked + .r-Toggle__button:after {
  -webkit-transform: translateX(-100%);
  -webkit-transition: all 0.4s ease;
  left: 100%;
}

.r-Toggle__input + .r-Toggle__button:after {
  border-radius: 2em;
  background: @default--hover-color;

  -webkit-transform: translateX(0%);
  -webkit-transition: all 0.4s ease;
}

.r-Toggle__input + .r-Toggle__button:after {
  left: 0;
}

.r-Toggle__input + .r-Toggle__button:active {
  box-shadow: inset 0 0 0 2em #e8eae9;
}

.r-Toggle__input + .r-Toggle__button:active:after {
  padding-right: 0.8em;
}

.r-Toggle__input {
  opacity: 1;
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0;
  left: 0;
  cursor: pointer;
}

.r-Toggle {
  display: inline-block;
  vertical-align: middle;
  overflow: hidden;
}

.r-Toggle__input.checked + .r-Toggle__button:after {
  border-radius: 2em;
  background: #fff;
}

.r-Toggle.e-color {
  background: rgba(247, 247, 247, 0.85);
  border-radius: 2em;
  padding: 2px;
  -webkit-transition: all 0.4s ease;
  transition: all 0.4s ease;
  border: 1px solid #ccc;
}

.r-Toggle__item {
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  position: relative;
  text-align: center;
}

.r-Toggle__item > div {
  border-radius: 50%;
}

.r-Toggle__item:not(.e-selected) {
  opacity: 0.5;
}

.r-Toggle__item:not(:last-child) > div {
  margin-right: 3px !important;
}

.r-Toggle.e-numbers {
  background: rgba(247, 247, 247, 0.85);
  border-radius: 2em;
  padding: 1px;
  -webkit-transition: all 0.4s ease;
  transition: all 0.4s ease;
  border: 1px solid #ccc;
  height: 32px;
}
.r-Toggle__item__string {
  margin-top: 5px;
}
.r-Toggle__item.e-selected {
  opacity: 1;
  font-weight: 800;
  color: @primary-background;
}

.r-Toggle__item:not(:last-child) .r-Toggle__item__string {
  margin-right: 10px !important;
}

// sizes

// large

.r-Toggle.large .r-Toggle__input + .r-Toggle__button {
  // width: 5em;
  height: 2.5em;
}

.r-Toggle.large .r-Toggle__input + .r-Toggle__button:after {
  border-radius: 50%;
}

.r-Toggle.large .r-Toggle__input + .r-Toggle__button:after {
  width: 2.4em;
}

.r-Toggle.large .r-Toggle__input:checked + .r-Toggle__button:after {
  right: 0;
  transform: translateX(-38px);
}

.r-Toggle.large .r-Toggle__input + .r-Toggle__button .text-right {
  margin-left: 40px;
  margin-right: 10px;
  font-size: 18px;
}

.r-Toggle.large .r-Toggle__input + .r-Toggle__button .text-white {
  margin-right: 40px;
  margin-left: 10px;
  font-size: 18px;
}

// xlarge

.r-Toggle.xlarge .r-Toggle__input + .r-Toggle__button {
  // width: 7.8em;
  height: 3.9em;
}

.r-Toggle.xlarge .r-Toggle__input + .r-Toggle__button:after {
  border-radius: 50%;
}

.r-Toggle.xlarge .r-Toggle__input + .r-Toggle__button:after {
  width: 3.6em;
}

.r-Toggle.xlarge .r-Toggle__input:checked + .r-Toggle__button:after {
  left: 100%;
  transform: translateX(-58px);
}

.r-Toggle.xlarge .r-Toggle__input + .r-Toggle__button .text-right {
  margin-left: 60px;
  font-size: 25px;
  margin-right: 10px;
}

.r-Toggle.xlarge .r-Toggle__input + .r-Toggle__button .text-white {
  margin-right: 60px;
  font-size: 25px;
  margin-left: 10px;
}

// small

.r-Toggle.small .r-Toggle__input + .r-Toggle__button {
  // width: 2.8em;
  height: 26px;
}

.r-Toggle.small .r-Toggle__input + .r-Toggle__button:after {
  border-radius: 50%;
}

.r-Toggle.small .r-Toggle__input + .r-Toggle__button:after {
  width: 1.5em;
}

.r-Toggle.small .r-Toggle__input:checked + .r-Toggle__button:after {
  left: 100%;
  transform: translateX(-24px);
}

//

.r-Toggle {
  min-width: 64px;
}

.r-Toggle.small {
  min-width: 45px;
}

.r-Toggle .r-WizardSlide.e-selected {
  box-shadow: none;
  position: relative !important;
}

//

.r-Toggle.e-numbers {
  display: table;
}

.r-Toggle__item {
  display: table-cell;
}

.r-Toggle__button > .r-Wizard {
  display: table-cell;
  vertical-align: middle;
}

.r-Toggle .r-Wizard > .r-Wizard__track {
  display: block !important;
  height: auto !important;
}
