.ui-input {
  &__checkbox {
    &--default {
      position: relative;

      width: 100%;

      max-width: 24px;
      height: 24px;
      margin-right: 1rem;
      margin-left: 0px;

      text-align: center;

      background-color: ui-color(white);
      border-color: ui-color(blue);
      border-style: solid;
      border-width: 1px;

      border-radius: $ui-br-border-radius;

      cursor: pointer;

      appearance: none;

      &--center {
        justify-content: center;
      }

      &:checked {
        &::after {
          @include ui-icon--checkmark;

          color: ui-color(blue);
          font-size: 12px;
          line-height: 21px;
        }
      }

      &:hover {
        outline: 1px solid ui-color(blue);
      }
    }

    &--toggle,
    &--white-toggle {
      position: absolute !important;

      width: 1px;
      height: 1px;
      overflow: hidden;

      clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
      clip: rect(1px, 1px, 1px, 1px);

      &:checked + label {
        color: ui-color(blue);

        border-color: ui-color(blue);
        box-shadow: inset 0 0 0 1px ui-color(blue);
      }

      &:hover + label {
        box-shadow: inset 0 0 0 1px ui-color(blue);
      }

      &:focus + label {
        border-width: 1px;
        box-shadow: none !important;
      }
    }

    &--toggle:focus + label,
    &--white-toggle:focus + label {
      outline: Highlight auto;
      outline: -webkit-focus-ring-color auto;
    }
  }

  &__checkbox-label {
    &--default {
      color: ui-color(blue);
      font-size: 14px;
      font-family: $ui-font-specter-regular;

      cursor: pointer;
    }

    &--toggle,
    &--white-toggle {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      min-height: 100px;

      text-align: center;

      cursor: pointer;
      @extend .ui-border;
      @extend .ui-border--light;
      @extend .ui-border-radius;
    }

    &--toggle {
      color: ui-color(blue);

      background-color: ui-color(natural);
      border: 1px solid ui-color(blue);
    }

    &--white-toggle {
      color: ui-color(blue);

      background-color: ui-color(white);
      border: 1px solid ui-color(blue);
    }
  }

  &__checkbox-label-text {
    &--default {
      margin: 0;

      font-size: 1rem;
      font-family: $ui-font-specter-regular;

      cursor: pointer;
    }

    &--toggle {
      margin: 0;
    }

    &--white-toggle {
      position: relative;

      margin: 0;
    }
  }

  &__checkbox-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;

    &--error {
      border-color: ui-color(red-dark);

      .ui-input__checkbox {
        box-shadow: 0 0 0 1px ui-color(red-dark);
      }

      .ui-input__checkbox-label {
        color: ui-color(red-dark);
      }
    }

    &--with-image {
      position: relative;

      & > label {
        overflow: visible;

        background: none;
      }

      .ui-input__image-checkbox-label {
        position: absolute;
        bottom: -25px;

        display: inline-block;

        font-weight: 700;
        white-space: nowrap;
      }
    }

    &--selected {
      .ui-input__checkbox-label--white-toggle::after {
        position: absolute;
        top: 0;
        right: 0;

        width: 24px;
        height: 24px;

        background: ui-color(blue);

        content: '';
      }

      .ui-input__checkbox-label--white-toggle::before {
        @include ui-icon--checkmark;

        position: absolute;
        top: 0;
        right: 3px;
        z-index: 1;

        width: 16px;

        color: ui-color(white);

        font-size: $ui-icon-dogear-size; // Bespoke
        line-height: 24px;
        text-align: center;
      }
    }
  }
}
