/*
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/

:host {
  display: inline-block;
}

:host(:focus) {
  outline: none;
}

#toggleContainer {
  position: relative;
  width: 64px;
  height: 16px;
}

#toggleBar {
  position: absolute;
  top: 8px;
  left: 16px;
  height: 1px;
  width: 32px;
  background-color: #5a5a5a;
  pointer-events: none;
}

#toggleBar[checked] {
  background-color: #0f9d58;
}

#toggleContainer[checked] #checkedBar {
  width: 100%;
}

#toggleRadio {
  position: absolute;
  left: 0;
  padding: 8px 48px 8px 0;
  margin: -8px -48px -8px 0;
  transition: -webkit-transform linear .08s;
  transition: transform linear .08s;
}

#toggleRadio[checked] {
  -webkit-transform: translate(48px, 0);
  transform: translate(48px, 0);
  padding: 8px 0 8px 48px;
  margin: -8px 0 -8px -48px;
}

#toggleRadio.dragging {
  -webkit-transition: none;
  transition: none;
}