

.material-switch {
  &.inline {
    display: inline-block;
    vertical-align: -0.35rem;
    margin-bottom: -0.35rem;
  }

  > input[type="checkbox"] {
    display: none;
  }

  > label {
    background-color: #f5f5f5;
    display: inline-block;
    position: relative;
    border: 1px solid rgba(204, 204, 204, 0.45);
    cursor: pointer;
    border-radius: 15px;
    height: 23px;
    width: 40px;
    margin-top: 2px;
    margin-bottom: -2px;
    transition: all 0.3s ease-in-out;
  }



  > label::after {
    background: #fff;
    box-shadow: 0px 0px 3px 0px rgba(2, 2, 2, 0.26);
    content: "";
    height: 17px;
    left: 3px;
    border-radius: 16px;
    margin-top: 0;
    top: 0.14rem;
    width: 18px;
    position: absolute;
    transition: all 0.3s ease-in-out;
    z-index: 99;
  }

  > input[type="checkbox"]:checked + label {
    background-color: $bg_switch_color !important;
    &::after {
      left: 18px;
    }
  }
  &.material-switch-md {
    padding: 0;

    > label {
      border-radius: 15px;
      height: 30px;
      width: 60px;
      &::after {
        height: 22px;
        left: 3px;
        border-radius: 16px;
        margin-top: 1px;
        top: 0.14rem;
        width: 22px;
      }
    }

    > input[type="checkbox"]:checked + label::after {
      left: 33px;
    }
  }
  &.material-switch-sm {
    padding: 0;

    > label {
      border-radius: 15px;
      height: 23px;
      width: 40px;
      margin-top: 2px;
      &::after {
        height: 17px;
        left: 3px;
        border-radius: 16px;
        margin-top: 0;
        top: 0.14rem;
        width: 18px;
      }
    }

    > input[type="checkbox"]:checked + label::after {
      left: 18px;
    }
  }

  &.material-switch-xs {
    padding: 0;

    > label {
      height: 17px;
      width:30px;
      margin-top:-13px;
      &::after {
        top: 0.15rem;
        height: 10px;
        width: 10px;
        left:3px;
      }
    }

    > input[type="checkbox"]:checked + label::after {
      left: 15px;
    }
  }
}
.input-group{
  .input-group-append , .input-group-prepend{
    .material-switch {
      > label {
        background-color: #8a8a8a;
      }
    }
  }
}

