/**
 * 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.
 */


@bg-color-on: #1EB475;
@bg-color-off: #EBECF1;
@text-color-off: #666;
@circle-size: 20px;

.circle-toggle-switch {
  .bootstrap-switch {
    border-radius: 28px;
    border: none;

    .bootstrap-switch-label {
      border-radius: @circle-size;
      width: @circle-size !important;
      height: @circle-size;
      line-height: 14px;
    }

    .bootstrap-switch-container {
      height: 28px;
    }
  }

  .bootstrap-switch-on {
    background-color: @bg-color-on;
    .bootstrap-switch-container {
      background-color: transparent;
    }
    .bootstrap-switch-label {
      box-shadow: 1px 1px 30px 1px @text-color-off;
      margin-top: 4px;
      margin-left: -4px;
      margin-right: 4px;
    }
  }

  .bootstrap-switch-off {
    box-shadow: inset 0 0 5px @text-color-off;
    background-color: @bg-color-off;

    .bootstrap-switch-container {
      background-color: transparent;
    }
    .bootstrap-switch-label {
      margin-top: 4px;
      margin-left: 4px;
      margin-right: 5px;
      background-color: #999;
      border: none;
    }
  }

  .bootstrap-switch-handle-on.bootstrap-switch-success,
  .bootstrap-switch-handle-off.bootstrap-switch-success {
    background-color: transparent !important;
  }

  .bootstrap-switch-handle-on.bootstrap-switch-default,
  .bootstrap-switch-handle-off.bootstrap-switch-default {
    background-color: transparent !important;
    color: @text-color-off !important;
    text-align: left;
  }

  .bootstrap-switch-handle-off.bootstrap-switch-default:hover {
    background-color: transparent !important;
    color: @text-color-off !important;
  }
}
