.Checkbox {
  -webkit-appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-block;
  height: var(--Icon-size) !important;
  padding: 0;
  position: relative;
  vertical-align: middle;
  width: var(--Icon-size) !important;

  &:focus {
    background: transparent;
    padding: 0;
  }

  &::before {
    border: 1px solid currentcolor;
    border-radius: 2px;
    bottom: 3px;
    content: '';
    left: 3px;
    position: absolute;
    right: 3px;
    top: 3px;
  }

  &::after {
    .Icon;

    display: block;
    top: 0;
  }

  &:checked::after {
    content: 'check_box';
  }

  &:indeterminate::after {
    content: 'indeterminate_check_box';
  }
}

.Checkbox.is-toggle {
  .Icon.is-l;

  margin: calc(0px - var(--Icon-size) * 0.1) 0
    calc(0px - var(--Icon-size) * 0.1) calc(0px - var(--Icon-size) * 0.1);

  &::before {
    background: var(--color-gray5);
    border: 0;
    border-radius: 50%;
    bottom: auto;
    height: var(--Icon-size);
    left: calc(50% - var(--Icon-size) / 2);
    opacity: 0;
    right: auto;
    top: calc(50% - var(--Icon-size) / 2);
    transform: scale(0);
    transition:
      opacity var(--time-xs) var(--ease-in),
      transform var(--time-s) var(--ease-out);
    width: var(--Icon-size);
  }

  &::after {
    color: var(--color-gray5);
    content: 'toggle_off';
  }

  &:checked::after {
    color: var(--Link-hoverColor);
    content: 'toggle_on';
  }

  &:checked::before {
    background: var(--Link-hoverColor);
  }

  &:focus,
  &:hover {
    &::before {
      transform: none;
    }
  }

  &:hover::before {
    opacity: 0.08;
  }

  &:focus::before {
    opacity: 0.16;
  }
}

input[type='checkbox'] {
  &:extend(.Checkbox all);
}
