paper-checkbox {
  display: inline-block;
  white-space: nowrap;
  position: relative;

  input {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  &:focus {
    outline: none;
  }

  .hidden.paper-checkbox {
    display: none;
  }

  [data-id=checkboxContainer].paper-checkbox {
    display: inline-block;
    position: relative;
    width: 18px;
    height: 18px;
    cursor: pointer;
    transform: translateZ(0);
    vertical-align: middle;

    * {
      pointer-events: none;
    }
  }

  [data-id=ink].paper-checkbox {
    $offset: -15px;

    top: $offset;
    right: $offset;
    bottom: $offset;
    left: $offset;
    pointer-events: none;

    &, [data-id=waves] {
      overflow: visible;
    }

    [data-id=waves] {
      -webkit-mask-image: none;
    }
  }

  [data-id=checkbox].paper-checkbox {
    position: relative;
    box-sizing: border-box;
    height: 100%;
    border: solid 2px;
    border-radius: 2px;
    pointer-events: none;
    transition: background-color 140ms, border-color 140ms;
  }

  [data-id=checkbox].checked.paper-checkbox [data-id=checkmark].paper-checkbox {
    animation: checkmark-expand 140ms ease-out forwards;
  }

  [data-id=checkmark].paper-checkbox {
    transform: rotate(45deg);
    position: absolute;
    top: -1px;
    left: 4px;
    width: 5px;
    height: 10px;
    border-style: solid;
    border-top: none;
    border-left: none;
    border-right-width: 2px;
    border-bottom-width: 2px;
    box-sizing: content-box;
  }

  [data-id=checkboxLabel].paper-checkbox {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    padding-left: 8px;
    white-space: normal;
    pointer-events: none;
  }

  [data-id=checkboxLabel][hidden].paper-checkbox {
    display: none;
  }

  &[disabled] {
    pointer-events: none;
  }

  &[disabled] [data-id=checkbox].paper-checkbox {
    opacity: 0.5;
  }

  &[disabled][checked] [data-id=checkbox].paper-checkbox {
    opacity: 0.5;
  }

  &[disabled] [data-id=checkboxLabel].paper-checkbox {
    opacity: 0.65;
  }
}

@keyframes checkmark-expand {
  0% {
    top: 9px;
    left: 6px;
    width: 0px;
    height: 0px;
  }

  100% {
    top: -1px;
    left: 4px;
    width: 5px;
    height: 10px;
  }
}