.radioGroup {
  display: flex;
  color: $gray-900;
  font-size: calc(1rem - 2px);
  color: $ui-white;

  &[data-disabled] {
    .item {
      opacity: $opacity-disabled;
      cursor: not-allowed;
    }
  }
}

.horizontal {
  align-items: center;
  flex-direction: row;
  gap: 1rem;
  width: 100%;
}

.vertical {
  align-items: start;
  flex-direction: column;
}

.item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 2rem;

  &:has([data-checked]) {
    color: $ui-white;
  }
}

.radio {
  box-sizing: border-box;
  display: flex;
  width: 16px; // use absolute units to avoid subpixel rendering issues
  height: 16px;
  align-items: center;
  justify-content: center;
  border-radius: 100%;
  outline: 0;
  border: none;

  &[data-unchecked] {
    border: 1px solid $gray-1200;
    background-color: $gray-1200;
  }

  &[data-checked] {
    background-color: $blue-700;
  }

  &:focus-visible {
    outline: 2px solid $blue-500;
    outline-offset: 2px;
  }
}

.indicator {
  display: grid;
  place-content: center;

  &[data-unchecked] {
    display: none;
  }

  &::before {
    content: '';
    border-radius: 100%;
    width: 6px; // half of the radio size
    height: 6px;
    aspect-ratio: 1;
    background-color: $ui-white;
  }
}
