/* Copyright CloudLinux Zug GmbH 2010-2017 All Rights Reserved
 *
 * Licensed under CLOUD LINUX LICENSE AGREEMENT
 * http://cloudlinux.com/docs/LICENSE.TXT
 */

:host {
  position: relative;
  display: inline-flex;
  align-items: center;

  & > input[type="checkbox"] {
    display: none;

    &:checked {
      & + label {
        &::before {
          background-color: #badeff;
        }

        &:after {
          background-color: #2b98f0;
          box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5);
          left: 20px;
        }
      }
    }
  }

  & > label {
    cursor: pointer;
    height: 0;
    position: relative;
    width: 40px;
    margin-left: 8px;

    &::before {
      background: #b0afaf;
      border-radius: 8px;
      content: '';
      height: 13px;
      margin-top: -8px;
      position:absolute;
      width: 30px;
    }

    &.animation::before {
      transition: all 0.4s ease-in-out;
    }

    &::after {
      background-color: #f1f1f1;
      border-radius: 16px;
      box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5);
      content: '';
      height: 18px;
      left: -8px;
      margin-top: -8px;
      position: absolute;
      top: -3px;
      width: 18px;
    }

    &.animation::after {
      transition: all 0.3s ease-in-out;
    }
  }

}
