checkbutton {
  border-spacing: 4px;
  border-radius: $button_radius;
  transition: $focus_transition;

  @include focus-ring();

  &.text-button {
    // this is for a nice focus on check and radios text
    padding: 4px;
  }
}

check,
radio {
  min-height: 14px;
  min-width: 14px;
  padding: 1px;
  -gtk-icon-size: 14px;
  background-color: $trough_color;

  @if $contrast == "high" {
    box-shadow: inset 0 0 0 1px $borders_color;
  }

  &:hover {
    background-color: $trough_hover_color;

    &:active { background-color: $trough_active_color; }
  }

  &:checked,
  &:indeterminate {
    background-color: $fill_color;
    color: $fill_text_color;

    @if $contrast == "high" {
      box-shadow: none;
    }

    &:hover {
      background-color: $fill_hover_color;

      &:active { background-color: $fill_active_color; }
    }
  }

  &:disabled {
    filter: opacity(.5);
  }
}

check {
  border-radius: 3px;

  &:checked { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("assets/check-symbolic.symbolic.png")),
                                            -gtk-recolor(url("assets/check@2-symbolic.symbolic.png"))); }

  &:indeterminate { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("assets/dash-symbolic.symbolic.png")),
                                                  -gtk-recolor(url("assets/dash@2-symbolic.symbolic.png"))); }
}

radio {
  border-radius: 100%;

  &:checked { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("assets/bullet-symbolic.symbolic.png")),
                                            -gtk-recolor(url("assets/bullet@2-symbolic.symbolic.png"))); }

  &:indeterminate { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("assets/dash-symbolic.symbolic.png")),
                                                  -gtk-recolor(url("assets/dash@2-symbolic.symbolic.png"))); }
}

//selection-mode
.view.content-view.check:not(list),
.content-view .tile check:not(list) {
  margin: 4px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 5px;

  &:checked { -gtk-icon-source: -gtk-icontheme('object-select-symbolic'); }
}
