/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
@import "../style/index.scss";
@import "../icons/variables.scss";

.core-image-checkbox {
  display: inline-block;
  font-size: 16px;
  position: relative;
  height: 1em;
  width: 1em;
  cursor: pointer;

  input[type="checkbox"]:not(:checked),
  input[type="checkbox"]:checked {
    position: absolute;
    z-index: -1;
    opacity: 0;
  }

  input[type="checkbox"]:checked + .image {
    color: $buic-foreground-primary;
  }

  input[type="checkbox"]:not(:checked) + .image {
    color: $buic-foreground-body;
  }

  input[type="checkbox"] + .image {
    opacity: 0.65;

    &:hover {
      opacity: 1;
    }
  }

  input[type="checkbox"]:disabled:not(:checked) + .image,
  input[type="checkbox"]:disabled:checked + .image {
    opacity: .25;
  }

  /* accessibility */
  [type="checkbox"]:focus + .image:before {
    outline: 1px dotted currentColor;
  }
}
.image-checkbox-border {
  border: 1px solid $buic-foreground-disabled;
  background-color:  $buic-background-control;
  border-radius: $uicore-border-radius;
  padding: 1px 3px 0 2px;
}