/* Radio
--------*/
/* Radio Button Groups ---*/

fieldset.t3onoff {

  width: 90px;
  height: 30px;
  white-space: nowrap;
  overflow: hidden;
  display: block;
  padding: 0 !important;
  position: relative;
  border: 1px solid #aaa;
  border-radius: 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;


  input[type=radio] {
    display: none;
  }

  label {
    width: 90px;
    height: 30px;
    overflow: hidden;
    display: block;
    border-radius: 0;
    position: absolute;
    top: -1px;
    left: -1px;
    z-index: 1;
    text-transform: uppercase;
    background: url(../imgs/blank.gif) no-repeat transparent;
    text-indent: -999em;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
  }

  /* use before as background */
  label:before,
  label:after {
    display: block;
    position: absolute;
    top: 0;
    border-radius: 0;
    border: 1px solid #aaa;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;

    -webkit-transition: all 250ms;
    transition: all 250ms;
  }

  label:before {
    content: "ON";
    width: 100%;
    height: 100%;
    
    text-indent: 0;
    color: white;
    padding: 4px 18px;
    font-weight: normal;
  }

  /* use after as switch */
  label:after {
    content: "";
    
    width: 40%;
    height: 100%;
    background: #fff;
  }

  label.off:before {
    content: "OFF";
    text-align: right;
    color: #555;
  }

  /* active label should be under => so inactive can be clickable */
  label.active {
    z-index: 0;
  }

  /* off background */
  label.off:before {
    background: #eee;
    left: 100%;
  }

  label.off.active:before {
    left: 0%;
  }

  label.on:before {
    background: #690;
    left: -100%;
  }

  label.on.active:before {
    left: -0%;
  }

  /* off switch */
  label.off:after {
    left: 60%;
  }

  label.off.active:after {
    left: 0%;
  }

  label.on:after {
    left: 0%;
  }

  label.on.active:after {
    left: 60%;
  }
}

/* radio btn group */
fieldset.radio.btn-group {
  padding: 0;

  input {
    display: none;
  }

  label {
    display: inline-block;
    min-width: 54px;
    padding: 0 12px;
    border: 1px solid #aaa;
    line-height: 28px;
    background: #eee;
    color: #555;
    border-radius: 0;
    text-align: center;
    border-right-width: 0px;
    text-transform: uppercase;

    &:last-child {
      border-right-width: 1px;
    }

    &.active {
      background: #690;
      border-color: #5c8b00;
      color: #fff;
    }
  }
}
