/* CheckBox */
.ui-check-box {
  @apply inline-flex;
}

.ui-check-box__label {
  @apply inline-flex cursor-pointer items-center gap-2 text-gray-900;
}

.ui-check-box--disabled .ui-check-box__label,
.ui-check-box--checked-disabled .ui-check-box__label {
  @apply cursor-not-allowed;
}

.ui-check-box__control {
  @apply relative shrink-0;
}

.ui-check-box__control--sm {
  @apply size-3;
}

.ui-check-box__control--md {
  @apply size-4;
}

.ui-check-box__control--lg {
  @apply size-5;
}

.ui-check-box__input {
  @apply absolute inset-0 m-0 cursor-pointer appearance-none border border-gray-200 bg-white transition-colors outline-none;
}

.ui-check-box__input--sm {
  @apply rounded-xs;
}

.ui-check-box__input--md,
.ui-check-box__input--lg {
  @apply rounded-sm;
}

.ui-check-box__input:checked {
  @apply border-indigo-500 bg-indigo-500;
}

.ui-check-box__input:disabled {
  @apply cursor-not-allowed border-gray-200 bg-gray-50;
}

.ui-check-box__input:checked:disabled {
  @apply border-gray-200 bg-gray-200;
}

.ui-check-box__input:focus-visible {
  @apply border-blue-500 ring-1 ring-inset ring-blue-500;
}

.ui-check-box__indicator {
  @apply pointer-events-none absolute inset-0 flex items-center justify-center opacity-0 text-white transition-opacity;
}

.ui-check-box__icon {
  @apply block shrink-0;
}

.ui-check-box__indicator--sm .ui-check-box__icon {
  @apply size-2;
}

.ui-check-box__indicator--md .ui-check-box__icon {
  @apply size-3;
}

.ui-check-box__indicator--lg .ui-check-box__icon {
  @apply size-3.5;
}

.ui-check-box__control:has(.ui-check-box__input:checked) .ui-check-box__indicator {
  @apply opacity-100;
}

.ui-check-box__text--sm {
  @apply text-sm font-normal leading-5;
}

.ui-check-box__text--md {
  @apply text-base font-normal leading-6;
}

.ui-check-box__text--lg {
  @apply text-lg font-normal leading-7;
}

.ui-check-box--disabled .ui-check-box__text,
.ui-check-box--checked-disabled .ui-check-box__text {
  @apply text-gray-400;
}
