@import '../../styles/common/colors';

.checkbox-component {
  cursor: pointer;
  overflow: hidden;
  position: relative;
  width: 100%;

  > input {
    cursor: pointer;
    height: 100%;
    left: 0;
    margin: 0;
    opacity: 0;
    padding: 0;
    position: absolute;
    width: 100%;
  }

    > input:checked + div .checkbox-input {
      svg {
        display: block;
        width: 75%;
        height: 75%;
        margin: 2px auto;
      }
    }

  > div {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;

    .checkbox-input {
      background-color: $white;
      border: solid 2px $neutral-3;
      border-radius: 10%;
      height: 20px;
      flex-shrink: 0;
      width: 20px;

      svg {
        display: none;
      }
    }

    label {
      color: $navy-text;
      font-size: 14px;

      &.label-left{
        margin-right: 10px;
      }

      &.label-right {
        margin-left: 10px;
      }
    }

  }

  &.checkbox-error {
    > div .checkbox-input {
      border-color: $danger;
    }
  }

  &.checkbox-disabled {
    cursor: not-allowed;

    > input {
      cursor: not-allowed;
    }

    > div {
      label {
        color: $neutral-3;
      }

      .checkbox-input {
        background-color: $neutral-3;
        border-color: $neutral-3;
        &:before {
          display: none;
        }
      }
    }
  }
}
