$switch-width: $baseline-grid * 8;

md-switch {
  display: block;
  position: relative;
  height: $baseline-grid * 3;
  margin: $baseline-grid;

  display: flex;
  align-items: center;

  .md-switch-bar {
    position: absolute;
    left: $baseline-grid * 2;
    top: $baseline-grid * 1.5;
    width: $baseline-grid * 4;
    height: 1px;
    pointer-events: none;
  }

  /* used also in _radio-button.scss */
  .md-switch-thumb {
    position: absolute;
    margin: 0;
    left: 0;
    top: 0;
    outline: none;

    .md-container {
      position: absolute;
      transition: transform 0.2s linear;
      transform: translate3d(0,0,0);
    }
    &.md-checked .md-container {
      transform: translate3d($switch-width - 16,0,0);
    }

    .md-label {
      margin-left: $baseline-grid * 9;
    }
  }
}
