/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
@import "../../../variables.scss";

label {
  font-family: Roboto-Regular;
}

.toggle-disabled {
  opacity: 0.3;
}

.toggle-disabled .slider,
.toggle-disabled input {
  cursor: default !important;
}

.switch {
  position: relative;
  display: inline-block;
  width: 35px;
  height: 18px;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  top: 6px;

  .inputdemo {
    display: none;
  }

  .round {
    border-radius: 23px;
  }

  .round:before {
    border-radius: 50%;
  }
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  -webkit-transition: .4s;
  transition: .4s;

  &:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 0px;
    bottom: 0px;
    -webkit-transition: .4s;
    transition: .4s;
  }
}

.inputdemo + .slider {
  background-color: $trout;
}

.inputdemo + .slider:before {
  background-color: $oslo-gray;
  border: 2px solid $gray-chateau;
}

.inputdemo:checked + .slider {
  background-color: $matisse;
}

.inputdemo:checked + .slider:before {
  background-color: $eastern-blue-1;
  border: 2px solid $downy
}

.inputdemo:checked + .slider:before {
  -webkit-transform: translateX(17px);
  -ms-transform: translateX(17px);
  transform: translateX(17px);
}
